Skip to content

Commit

Permalink
return balance in the parent implementation of the getTokensByPartiti…
Browse files Browse the repository at this point in the history
…on()
  • Loading branch information
SatyamSB committed Jun 12, 2019
1 parent 2556399 commit ef06a10
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions contracts/modules/TransferManager/TransferManager.sol
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,14 @@ contract TransferManager is ITransferManager, Module {

/**
* @notice return the amount of tokens for a given user as per the partition
* @dev returning the balance of token holder against the UNLOCKED partition.
* This condition is valid only when the base contract doesn't implement the
* `getTokensByPartition()` function.
*/
function getTokensByPartition(bytes32 /*_partition*/, address /*_tokenHolder*/, uint256 /*_additionalBalance*/) external view returns(uint256) {
return 0;
function getTokensByPartition(bytes32 _partition, address _tokenHolder, uint256 /*_additionalBalance*/) external view returns(uint256) {
if (_partition == UNLOCKED)
return ISecurityToken(securityToken).balanceOf(_tokenHolder);
return uint256(0);
}

/**
Expand Down

0 comments on commit ef06a10

Please sign in to comment.