Skip to content

Commit

Permalink
fix(locked-tokens): replace balances with balanceOf()
Browse files Browse the repository at this point in the history
  • Loading branch information
0xferit committed Nov 21, 2018
1 parent 4ed6a91 commit c2460d2
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ contract LockedToken is ERC20Mintable {
*/
function transfer(address _to, uint256 _value) public returns (bool) {
unlock(msg.sender);
require(balances[msg.sender].sub(amountLocked[msg.sender]) >= _value, "Not enough balance.");
require(balanceOf(msg.sender).sub(amountLocked[msg.sender]) >= _value, "Not enough balance.");

assert(super.transfer(_to,_value));
return true;
Expand All @@ -85,7 +85,7 @@ contract LockedToken is ERC20Mintable {
*/
function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {
unlock(_from);
require(balances[_from].sub(amountLocked[_from]) >= _value, "Not enough balance.");
require(balanceOf(_from).sub(amountLocked[_from]) >= _value, "Not enough balance.");

assert(super.transferFrom(_from,_to,_value));
return true;
Expand Down

0 comments on commit c2460d2

Please sign in to comment.