From 6c4fd0651e1825e9cb03e4d2d4267aa2c1e995bb Mon Sep 17 00:00:00 2001 From: Ricardo Guilherme Schmidt <3esmit@gmail.com> Date: Fri, 13 Apr 2018 15:33:12 -0300 Subject: [PATCH] reduce gas usage --- contracts/communication/MessageTribute.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contracts/communication/MessageTribute.sol b/contracts/communication/MessageTribute.sol index ecb0844..8c19d8a 100644 --- a/contracts/communication/MessageTribute.sol +++ b/contracts/communication/MessageTribute.sol @@ -175,12 +175,12 @@ contract MessageTribute is Controlled { function getFee(address _from) internal view returns (Fee) { - Fee memory generalFee = feeCatalog[_from][address(0)]; Fee memory specificFee = feeCatalog[_from][msg.sender]; if (friendIndex[keccak256(msg.sender, _from)] > 0) return Fee(0, false); + Fee memory generalFee = feeCatalog[_from][address(0)]; return specificFee.amount > 0 ? specificFee : generalFee; }