simplify events

This commit is contained in:
mingda
2020-07-11 13:57:07 +08:00
parent 8a71324b35
commit 8e64b5e370
3 changed files with 21 additions and 39 deletions

View File

@@ -30,9 +30,7 @@ contract Trader is Storage, Pricing, Settlement {
event BuyBaseToken(address indexed buyer, uint256 receiveBase, uint256 payQuote);
event ChargeMaintainerFeeBase(address indexed maintainer, uint256 amount);
event ChargeMaintainerFeeQuote(address indexed maintainer, uint256 amount);
event ChargeMaintainerFee(address indexed maintainer, bool isBaseToken, uint256 amount);
// ============ Modifiers ============
@@ -85,7 +83,7 @@ contract Trader is Storage, Pricing, Settlement {
_donateQuoteToken(lpFeeQuote);
emit SellBaseToken(msg.sender, amount, receiveQuote);
if (mtFeeQuote != 0) {
emit ChargeMaintainerFeeQuote(_MAINTAINER_, mtFeeQuote);
emit ChargeMaintainerFee(_MAINTAINER_, false, mtFeeQuote);
}
return receiveQuote;
@@ -128,7 +126,7 @@ contract Trader is Storage, Pricing, Settlement {
_donateBaseToken(lpFeeBase);
emit BuyBaseToken(msg.sender, amount, payQuote);
if (mtFeeBase != 0) {
emit ChargeMaintainerFeeBase(_MAINTAINER_, mtFeeBase);
emit ChargeMaintainerFee(_MAINTAINER_, true, mtFeeBase);
}
return payQuote;