Skip to content

Commit

Permalink
carbon pol eth conversion - minor fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ivanzhelyazkov committed Nov 28, 2023
1 parent aa38cb1 commit d70247c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion contracts/pol/CarbonPOL.sol
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ contract CarbonPOL is ICarbonPOL, Upgradeable, ReentrancyGuardUpgradeable, Utils
} else {
inputAmount = _sellTokenForETH(token, amount);
}
emit TokenTraded(msg.sender, token, amount, inputAmount);
emit TokenTraded(msg.sender, token, inputAmount, amount);
}

function _sellTokenForETH(Token token, uint128 amount) private returns (uint128) {
Expand Down
4 changes: 2 additions & 2 deletions test/forge/CarbonPOL.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -619,7 +619,7 @@ contract CarbonPOLTest is TestFixture {

// trade
vm.expectEmit();
emit TokenTraded(user1, token, tradeAmount, expectedTradeInput);
emit TokenTraded(user1, token, expectedTradeInput, tradeAmount);
carbonPOL.trade{ value: expectedTradeInput }(token, tradeAmount);

vm.stopPrank();
Expand Down Expand Up @@ -648,7 +648,7 @@ contract CarbonPOLTest is TestFixture {

// trade
vm.expectEmit();
emit TokenTraded(user1, token, tradeAmount, expectedTradeInput);
emit TokenTraded(user1, token, expectedTradeInput, tradeAmount);
carbonPOL.trade(token, tradeAmount);

vm.stopPrank();
Expand Down

0 comments on commit d70247c

Please sign in to comment.