Commit 8b1f1ab6 by Manuel Araoz

Remove redundant checks in StandardToken

parent 582baea6
......@@ -16,9 +16,6 @@ contract StandardToken is ERC20, SafeMath {
mapping (address => mapping (address => uint)) allowed;
function transfer(address _to, uint _value) returns (bool success) {
if (balances[msg.sender] < _value) {
throw;
}
balances[msg.sender] = safeSub(balances[msg.sender], _value);
balances[_to] = safeAdd(balances[_to], _value);
Transfer(msg.sender, _to, _value);
......@@ -27,10 +24,6 @@ contract StandardToken is ERC20, SafeMath {
function transferFrom(address _from, address _to, uint _value) returns (bool success) {
var _allowance = allowed[_from][msg.sender];
if (balances[_from] < _value ||
_allowance < _value) {
throw;
}
balances[_to] = safeAdd(balances[_to], _value);
balances[_from] = safeSub(balances[_from], _value);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment