From 1f29ca9d7c3fc057874938c2c5ee4e71f8e7b85c Mon Sep 17 00:00:00 2001 From: Mudit Gupta Date: Fri, 5 Oct 2018 14:08:34 +0530 Subject: [PATCH] Decimals fixed for percentage --- contracts/modules/TransferManager/PercentageTransferManager.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contracts/modules/TransferManager/PercentageTransferManager.sol b/contracts/modules/TransferManager/PercentageTransferManager.sol index 0e67539af..de5b590a3 100644 --- a/contracts/modules/TransferManager/PercentageTransferManager.sol +++ b/contracts/modules/TransferManager/PercentageTransferManager.sol @@ -45,7 +45,7 @@ contract PercentageTransferManager is ITransferManager { return Result.NA; } uint256 newBalance = ISecurityToken(securityToken).balanceOf(_to).add(_amount); - if (newBalance.mul(10**uint256(ISecurityToken(securityToken).decimals())).div(ISecurityToken(securityToken).totalSupply()) > maxHolderPercentage) { + if (newBalance.mul(uint256(10)**18).div(ISecurityToken(securityToken).totalSupply()) > maxHolderPercentage) { return Result.INVALID; } return Result.NA;