Skip to content

Commit

Permalink
Update fee events logic on HomeBridgeErcToErc
Browse files Browse the repository at this point in the history
  • Loading branch information
patitonar committed Apr 22, 2019
1 parent 3592024 commit 6b25ffb
Showing 1 changed file with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ import "../../IBlockReward.sol";
contract HomeBridgeErcToErc is ERC677Receiver, EternalStorage, BasicBridge, BasicHomeBridge, ERC677Bridge, OverdrawManagement, RewardableHomeBridgeErcToErc {

event AmountLimitExceeded(address recipient, uint256 value, bytes32 transactionHash);
event FeeDistributedFromAffirmation(uint256 feeAmount, bytes32 indexed transactionHash);
event FeeDistributedFromSignatures(uint256 feeAmount, bytes32 indexed transactionHash);

function initialize (
address _validatorContract,
Expand Down Expand Up @@ -169,8 +167,7 @@ contract HomeBridgeErcToErc is ERC677Receiver, EternalStorage, BasicBridge, Basi
address feeManager = feeManagerContract();
if (feeManager != address(0)) {
uint256 fee = calculateFee(valueToMint, false, feeManager, FOREIGN_FEE);
distributeFeeFromAffirmation(fee, feeManager);
emit FeeDistributedFromAffirmation(fee, txHash);
distributeFeeFromAffirmation(fee, feeManager, txHash);
valueToMint = valueToMint.sub(fee);
}
return erc677token().mint(_recipient, valueToMint);
Expand All @@ -195,8 +192,7 @@ contract HomeBridgeErcToErc is ERC677Receiver, EternalStorage, BasicBridge, Basi
address contractAddress;
(recipient, amount, txHash, contractAddress) = Message.parseMessage(_message);
uint256 fee = calculateFee(amount, true, feeManager, HOME_FEE);
distributeFeeFromSignatures(fee, feeManager);
emit FeeDistributedFromSignatures(fee, txHash);
distributeFeeFromSignatures(fee, feeManager, txHash);
}
}

Expand Down

0 comments on commit 6b25ffb

Please sign in to comment.