Skip to content

Commit

Permalink
Merge pull request #114 from PolymathNetwork/fix_TMs
Browse files Browse the repository at this point in the history
Fixed #113
  • Loading branch information
pabloruiz55 committed May 22, 2018
2 parents 010ac66 + 170692e commit ffe4faa
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions contracts/modules/TransferManager/CountTransferManager.sol
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ contract CountTransferManager is ITransferManager {
{
}

function verifyTransfer(address _from, address _to, uint256 /* _amount */) public view returns(Result) {
function verifyTransfer(address /* _from */, address _to, uint256 /* _amount */) public view returns(Result) {
if (!paused) {
if (maxHolderCount < ISecurityToken(securityToken).investorCount()) {
// Allow transfers to existing maxHolders
if (ISecurityToken(securityToken).balanceOf(_to) != 0) {
return Result.VALID;
return Result.NA;
}
return Result.INVALID;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,17 +35,17 @@ contract PercentageTransferManager is ITransferManager {
{
}

function verifyTransfer(address _from, address _to, uint256 _amount) public view returns(Result) {
function verifyTransfer(address /* _from */, address _to, uint256 _amount) public view returns(Result) {
if (!paused) {
// If an address is on the whitelist, it is allowed to hold more than maxHolderPercentage of the tokens.
if (whitelist[_to]) {
return Result.VALID;
return Result.NA;
}
uint256 newBalance = ISecurityToken(securityToken).balanceOf(_to).add(_amount);
if (newBalance.mul(10**18).div(ISecurityToken(securityToken).totalSupply()) > maxHolderPercentage) {
return Result.INVALID;
}
return Result.VALID;
return Result.NA;
}
return Result.NA;
}
Expand Down

0 comments on commit ffe4faa

Please sign in to comment.