From 98f672b534fe9779050a535a823c065b51c2bcff Mon Sep 17 00:00:00 2001 From: jakub-wojciechowski Date: Thu, 14 Sep 2017 22:04:34 +0200 Subject: [PATCH] Make approve method compliant with ERC20 --- contracts/token/StandardToken.sol | 7 ------- 1 file changed, 7 deletions(-) diff --git a/contracts/token/StandardToken.sol b/contracts/token/StandardToken.sol index 728fa7099..dfea3597d 100644 --- a/contracts/token/StandardToken.sol +++ b/contracts/token/StandardToken.sol @@ -44,13 +44,6 @@ contract StandardToken is ERC20, BasicToken { * @param _value The amount of tokens to be spent. */ function approve(address _spender, uint256 _value) public returns (bool) { - - // To change the approve amount you first have to reduce the addresses` - // allowance to zero by calling `approve(_spender, 0)` if it is not - // already 0 to mitigate the race condition described here: - // https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 - // require((_value == 0) || (allowed[msg.sender][_spender] == 0)); - allowed[msg.sender][_spender] = _value; Approval(msg.sender, _spender, _value); return true;