Skip to content

Commit

Permalink
refactor: code segmentation
Browse files Browse the repository at this point in the history
  • Loading branch information
yan-man committed Sep 9, 2024
1 parent 14fc942 commit 0ba7d24
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/contracts/facilitators/gsm/converter/GsmConverter.sol
Original file line number Diff line number Diff line change
Expand Up @@ -144,11 +144,10 @@ contract GsmConverter is Ownable, EIP712, IGsmConverter {

IGhoToken(GHO_TOKEN).transferFrom(originator, address(this), ghoAmount);
IGhoToken(GHO_TOKEN).approve(address(GSM), ghoAmount);

(uint256 redeemableAssetAmount, uint256 ghoSold) = IGsm(GSM).buyAsset(minAmount, address(this));
require(ghoAmount == ghoSold, 'INVALID_GHO_SOLD');

IGhoToken(GHO_TOKEN).approve(address(GSM), 0);

IERC20(REDEEMABLE_ASSET).approve(address(REDEMPTION_CONTRACT), redeemableAssetAmount);
IRedemption(REDEMPTION_CONTRACT).redeem(redeemableAssetAmount);
IERC20(REDEEMABLE_ASSET).approve(address(REDEMPTION_CONTRACT), 0);
Expand Down

0 comments on commit 0ba7d24

Please sign in to comment.