From a506223a634173f2443bc1ee76c51e94d97efbee Mon Sep 17 00:00:00 2001 From: Giovanni Sanchez <108043524+sisyphusSmiling@users.noreply.github.com> Date: Wed, 18 Sep 2024 17:44:19 -0600 Subject: [PATCH] fix FlowEVMBridgeUtils.borrowCOA() --- cadence/contracts/bridge/FlowEVMBridgeHandlers.cdc | 4 ++-- cadence/contracts/bridge/FlowEVMBridgeUtils.cdc | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cadence/contracts/bridge/FlowEVMBridgeHandlers.cdc b/cadence/contracts/bridge/FlowEVMBridgeHandlers.cdc index 93d760a5..635d706f 100644 --- a/cadence/contracts/bridge/FlowEVMBridgeHandlers.cdc +++ b/cadence/contracts/bridge/FlowEVMBridgeHandlers.cdc @@ -333,7 +333,7 @@ access(all) contract FlowEVMBridgeHandlers { let unwrapResult = FlowEVMBridgeUtils.call( signature: "withdraw(uint)", targetEVMAddress: wflowAddress, - args: [UInt(amount)], + args: [amount], gasLimit: FlowEVMBridgeConfig.gasLimit, value: 0.0 ) @@ -344,7 +344,7 @@ access(all) contract FlowEVMBridgeHandlers { // Cover underflow assert( postBalance > preBalance, - message: "Balance decremented after unwrapping WFLOW" + message: "Balance did not increment after unwrapping WFLOW amount=".concat(amount.toString()) ) // Confirm bridge COA's FLOW balance has incremented by the expected amount assert( diff --git a/cadence/contracts/bridge/FlowEVMBridgeUtils.cdc b/cadence/contracts/bridge/FlowEVMBridgeUtils.cdc index e5e35ad6..b1295ff1 100644 --- a/cadence/contracts/bridge/FlowEVMBridgeUtils.cdc +++ b/cadence/contracts/bridge/FlowEVMBridgeUtils.cdc @@ -1040,7 +1040,7 @@ contract FlowEVMBridgeUtils { /// access(account) view fun borrowCOA(): auth(EVM.Call, EVM.Withdraw) &EVM.CadenceOwnedAccount { - return self.account.storage.borrow( + return self.account.storage.borrow( from: FlowEVMBridgeConfig.coaStoragePath ) ?? panic("Could not borrow COA reference") }