Skip to content

Commit

Permalink
Refix F-2024-1928 | Use Of Transfer() Instead Of Call() To Send Funds
Browse files Browse the repository at this point in the history
  • Loading branch information
SvineruS committed May 19, 2024
1 parent a417f20 commit 528d0ac
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions contracts/contracts/common/CommonBridge.sol
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,10 @@ contract CommonBridge is Initializable, AccessControlUpgradeable, PausableUpgrad

uint amount = msg.value - transferFee - bridgeFee;
feeCheck(wrapperAddress, feeSignature, transferFee, bridgeFee, amount);
transferFeeRecipient.transfer(transferFee);
bridgeFeeRecipient.transfer(bridgeFee);
(bool sent, ) = payable(transferFeeRecipient).call{value: transferFee}("");
require(sent, "Transfer failed (transferFee)");
(sent, ) = payable(bridgeFeeRecipient).call{value: bridgeFee}("");
require(sent, "Transfer failed (bridgeFee)");

IWrapper(wrapperAddress).deposit{value : amount}();

Expand Down

0 comments on commit 528d0ac

Please sign in to comment.