Merge pull request #151 from AragonOne/clarity

Add clarifying comment to standard token transfer from function
This commit is contained in:
Manuel Aráoz
2017-03-01 17:16:15 -03:00
committed by GitHub

View File

@ -26,7 +26,10 @@ contract StandardToken is ERC20, SafeMath {
function transferFrom(address _from, address _to, uint _value) returns (bool success) {
var _allowance = allowed[_from][msg.sender];
// Check is not needed because safeSub(_allowance, _value) will already throw if this condition is not met
// if (_value > _allowance) throw;
balances[_to] = safeAdd(balances[_to], _value);
balances[_from] = safeSub(balances[_from], _value);
allowed[_from][msg.sender] = safeSub(_allowance, _value);