Skip to content

Commit

Permalink
Move decrease to after transfer
Browse files Browse the repository at this point in the history
  • Loading branch information
xhad committed Mar 7, 2024
1 parent a6e351b commit ff616f2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Chamber.sol
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,9 @@ contract Chamber is IChamber, Common {
_updateLeaderboard(tokenId);
}

SafeERC20.safeDecreaseAllowance(IERC20(govToken), address(this), amount);
SafeERC20.safeTransfer(IERC20(govToken), _msgSender(), amount);
SafeERC20.safeDecreaseAllowance(IERC20(govToken), address(this), amount);

emit Demoted(_msgSender(), amount, tokenId);
}

Expand Down

0 comments on commit ff616f2

Please sign in to comment.