diff --git a/examples/call/contracts/Universal.sol b/examples/call/contracts/Universal.sol index df36279..ca8f840 100644 --- a/examples/call/contracts/Universal.sol +++ b/examples/call/contracts/Universal.sol @@ -34,8 +34,9 @@ contract Universal is UniversalContract { (, uint256 gasFee) = IZRC20(zrc20).withdrawGasFeeWithGasLimit( callOptions.gasLimit ); - if (!IZRC20(zrc20).transferFrom(msg.sender, address(this), gasFee)) + if (!IZRC20(zrc20).transferFrom(msg.sender, address(this), gasFee)) { revert TransferFailed(); + } IZRC20(zrc20).approve(address(gateway), gasFee); gateway.call(receiver, zrc20, message, callOptions, revertOptions); } @@ -48,8 +49,9 @@ contract Universal is UniversalContract { ) external { (address gasZRC20, uint256 gasFee) = IZRC20(zrc20).withdrawGasFee(); uint256 target = zrc20 == gasZRC20 ? amount + gasFee : amount; - if (!IZRC20(zrc20).transferFrom(msg.sender, address(this), target)) + if (!IZRC20(zrc20).transferFrom(msg.sender, address(this), target)) { revert TransferFailed(); + } IZRC20(zrc20).approve(address(gateway), target); if (zrc20 != gasZRC20) { if ( @@ -58,7 +60,9 @@ contract Universal is UniversalContract { address(this), gasFee ) - ) revert TransferFailed(); + ) { + revert TransferFailed(); + } IZRC20(gasZRC20).approve(address(gateway), gasFee); } gateway.withdraw(receiver, amount, zrc20, revertOptions); @@ -85,7 +89,9 @@ contract Universal is UniversalContract { address(this), gasFee ) - ) revert TransferFailed(); + ) { + revert TransferFailed(); + } IZRC20(gasZRC20).approve(address(gateway), gasFee); } gateway.withdrawAndCall(