From 2bff7a929704e06d664ae637175545660acb9f89 Mon Sep 17 00:00:00 2001 From: wcgcyx Date: Mon, 6 Nov 2023 17:08:53 +1000 Subject: [PATCH] Update --- .../root/withdrawals.t.sol/RootERC20BridgeWithdraw.t.sol | 6 +++--- test/unit/root/withdrawals/RootERC20BridgeWithdraw.t.sol | 6 ++++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/test/integration/root/withdrawals.t.sol/RootERC20BridgeWithdraw.t.sol b/test/integration/root/withdrawals.t.sol/RootERC20BridgeWithdraw.t.sol index 1446194e..e571e5e4 100644 --- a/test/integration/root/withdrawals.t.sol/RootERC20BridgeWithdraw.t.sol +++ b/test/integration/root/withdrawals.t.sol/RootERC20BridgeWithdraw.t.sol @@ -165,15 +165,15 @@ contract RootERC20BridgeWithdrawIntegrationTest is bytes32 commandId = bytes32("testCommandId"); string memory sourceAddress = rootBridge.childBridgeAdaptor(); - uint256 thisPreBal = imxToken.balanceOf(receiver); + uint256 receiverPreBal = imxToken.balanceOf(receiver); uint256 bridgePreBal = imxToken.balanceOf(address(rootBridge)); axelarAdaptor.execute(commandId, CHILD_CHAIN_NAME, sourceAddress, data); - uint256 thisPostBal = imxToken.balanceOf(receiver); + uint256 receiverPostBal = imxToken.balanceOf(receiver); uint256 bridgePostBal = imxToken.balanceOf(address(rootBridge)); - assertEq(thisPostBal, thisPreBal + withdrawAmount, "Incorrect user balance after withdraw"); + assertEq(receiverPostBal, receiverPreBal + withdrawAmount, "Incorrect user balance after withdraw"); assertEq(bridgePostBal, bridgePreBal - withdrawAmount, "Incorrect bridge balance after withdraw"); } diff --git a/test/unit/root/withdrawals/RootERC20BridgeWithdraw.t.sol b/test/unit/root/withdrawals/RootERC20BridgeWithdraw.t.sol index 14d5d32b..61c79980 100644 --- a/test/unit/root/withdrawals/RootERC20BridgeWithdraw.t.sol +++ b/test/unit/root/withdrawals/RootERC20BridgeWithdraw.t.sol @@ -168,14 +168,16 @@ contract RootERC20BridgeWithdrawUnitTest is Test, IRootERC20BridgeEvents, IRootE // Give bridge some IMX tokens imxToken.transfer(address(rootBridge), 100 ether); - uint256 thisPreBal = imxToken.balanceOf(address(receiver)); + uint256 receiverPreBal = imxToken.balanceOf(address(receiver)); uint256 bridgePreBal = imxToken.balanceOf(address(rootBridge)); bytes memory data = abi.encode(WITHDRAW_SIG, imxToken, address(this), receiver, withdrawAmount); vm.prank(address(mockAxelarAdaptor)); rootBridge.onMessageReceive(CHILD_CHAIN_NAME, CHILD_BRIDGE_ADAPTOR_STRING, data); - assertEq(imxToken.balanceOf(address(receiver)), thisPreBal + withdrawAmount, "IMX not transferred to receiver"); + assertEq( + imxToken.balanceOf(address(receiver)), receiverPreBal + withdrawAmount, "IMX not transferred to receiver" + ); assertEq( imxToken.balanceOf(address(rootBridge)), bridgePreBal - withdrawAmount, "IMX not transferred from bridge" );