From f91f21735294e3fee38f848f83bde9b09b6b55fd Mon Sep 17 00:00:00 2001 From: JayJay1024 Date: Wed, 25 Oct 2023 10:34:43 +0800 Subject: [PATCH] fix tx fee for Helix(Legacy) redeem --- packages/apps/src/bridges/helixbridge-dvmdvm.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/packages/apps/src/bridges/helixbridge-dvmdvm.ts b/packages/apps/src/bridges/helixbridge-dvmdvm.ts index 224fb998b..dc82ce8ac 100644 --- a/packages/apps/src/bridges/helixbridge-dvmdvm.ts +++ b/packages/apps/src/bridges/helixbridge-dvmdvm.ts @@ -112,17 +112,15 @@ export class HelixBridgeDVMDVM extends BaseBridge { this.publicClient && this.walletClient ) { - const { args, value, functionName } = + const { args, functionName } = this.targetToken.type === "native" ? { functionName: "burnAndRemoteUnlockNative", args: [this.specVersion.target, this.gasLimit, recipient, amount], - value: amount + options.totalFee, } : { functionName: "burnAndRemoteUnlock", args: [this.specVersion.target, this.gasLimit, this.sourceToken.address, recipient, amount], - value: options.totalFee, }; const abi = (await import("@/abi/mappingtoken-dvmdvm.json")).default; @@ -131,7 +129,7 @@ export class HelixBridgeDVMDVM extends BaseBridge { abi, functionName, args, - value, + value: options.totalFee, gas: this.getTxGasLimit(), }); return this.publicClient.waitForTransactionReceipt({ hash });