From 26abe066b63a36cd628cc94ac26b7ad20108863b Mon Sep 17 00:00:00 2001 From: nolash Date: Fri, 5 Feb 2021 13:00:14 +0100 Subject: [PATCH] Remove useless bool check for balance adjustment result (they revert instead) --- solidity/RedistributedDemurrageToken.sol | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/solidity/RedistributedDemurrageToken.sol b/solidity/RedistributedDemurrageToken.sol index b50131f..ed2874c 100644 --- a/solidity/RedistributedDemurrageToken.sol +++ b/solidity/RedistributedDemurrageToken.sol @@ -317,12 +317,9 @@ contract RedistributedDemurrageToken { function transferBase(address _from, address _to, uint256 _value) private returns (bool) { uint256 period; - if (!decreaseBaseBalance(_from, _value)) { - revert('ERR_TX_DECREASEBALANCE'); - } - if (!increaseBaseBalance(_to, _value)) { - revert('ERR_TX_INCREASEBALANCE'); - } + decreaseBaseBalance(_from, _value); + increaseBaseBalance(_to, _value); + period = actualPeriod(); if (_value > 0 && accountPeriod(_from) != period) { registerAccountPeriod(_from, period);