Add clarifying comment to standard token transfer from function

This commit is contained in:
Jorge Izquierdo
2017-02-27 16:32:42 +01:00
parent 0a5af4b8ac
commit b9257a1092

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);