Skip to content

Commit b11bfc6

Browse files
committed
fix: safe operations
1 parent 0201eea commit b11bfc6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/contracts/facilitators/gsm/converter/GsmConverter.sol

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ contract GsmConverter is Ownable, EIP712, IGsmConverter {
183183

184184
(, uint256 ghoAmount, , ) = IGsm(GSM).getGhoAmountForBuyAsset(minAmount);
185185

186-
IGhoToken(GHO_TOKEN).transferFrom(originator, address(this), ghoAmount);
186+
IERC20(GHO_TOKEN).safeTransferFrom(originator, address(this), ghoAmount);
187187
IGhoToken(GHO_TOKEN).approve(address(GSM), ghoAmount);
188188
(uint256 boughtAssetAmount, uint256 ghoSold) = IGsm(GSM).buyAsset(minAmount, address(this));
189189
require(ghoAmount == ghoSold, 'INVALID_GHO_SOLD');
@@ -231,7 +231,7 @@ contract GsmConverter is Ownable, EIP712, IGsmConverter {
231231
uint256 initialRedeemedAssetBalance = IERC20(REDEEMED_ASSET).balanceOf(address(this));
232232

233233
(uint256 assetAmount, , , ) = IGsm(GSM).getGhoAmountForSellAsset(maxAmount); // asset is BUIDL
234-
IERC20(REDEEMED_ASSET).transferFrom(originator, address(this), assetAmount);
234+
IERC20(REDEEMED_ASSET).safeTransferFrom(originator, address(this), assetAmount);
235235
IERC20(REDEEMED_ASSET).approve(SUBSCRIPTION_CONTRACT, assetAmount);
236236
//TODO: replace with proper issuance implementation later
237237
MockBUIDLSubscription(SUBSCRIPTION_CONTRACT).issuance(assetAmount);

0 commit comments

Comments
 (0)