Skip to content

Commit 98f672b

Browse files
jakub-wojciechowskifrangio
authored andcommitted
Make approve method compliant with ERC20
1 parent e906885 commit 98f672b

File tree

1 file changed

+0
-7
lines changed

1 file changed

+0
-7
lines changed

contracts/token/StandardToken.sol

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,6 @@ contract StandardToken is ERC20, BasicToken {
4444
* @param _value The amount of tokens to be spent.
4545
*/
4646
function approve(address _spender, uint256 _value) public returns (bool) {
47-
48-
// To change the approve amount you first have to reduce the addresses`
49-
// allowance to zero by calling `approve(_spender, 0)` if it is not
50-
// already 0 to mitigate the race condition described here:
51-
// https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
52-
// require((_value == 0) || (allowed[msg.sender][_spender] == 0));
53-
5447
allowed[msg.sender][_spender] = _value;
5548
Approval(msg.sender, _spender, _value);
5649
return true;

0 commit comments

Comments
 (0)