Skip to content

Commit

Permalink
rename
Browse files Browse the repository at this point in the history
  • Loading branch information
fadeev committed Oct 7, 2024
1 parent b6a8ca3 commit ce2bab4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions examples/hello/contracts/Hello.sol
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@ contract Hello is UniversalContract {
) external {
(address gasZRC20, uint256 gasFee) = IZRC20(zrc20)
.withdrawGasFeeWithGasLimit(gasLimit);
uint256 total = zrc20 == gasZRC20 ? amount + gasFee : amount;
IZRC20(zrc20).transferFrom(msg.sender, address(this), total);
IZRC20(zrc20).approve(address(gateway), total);
uint256 targetAmount = zrc20 == gasZRC20 ? amount + gasFee : amount;
IZRC20(zrc20).transferFrom(msg.sender, address(this), targetAmount);
IZRC20(zrc20).approve(address(gateway), targetAmount);
if (zrc20 != gasZRC20) {
IZRC20(gasZRC20).transferFrom(msg.sender, address(this), gasFee);
IZRC20(gasZRC20).approve(address(gateway), gasFee);
Expand Down

0 comments on commit ce2bab4

Please sign in to comment.