Skip to content

Commit

Permalink
fix tx fee for Helix(Legacy) redeem
Browse files Browse the repository at this point in the history
  • Loading branch information
JayJay1024 committed Oct 25, 2023
1 parent 8ac5b11 commit f91f217
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions packages/apps/src/bridges/helixbridge-dvmdvm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -131,7 +129,7 @@ export class HelixBridgeDVMDVM extends BaseBridge {
abi,
functionName,
args,
value,
value: options.totalFee,
gas: this.getTxGasLimit(),
});
return this.publicClient.waitForTransactionReceipt({ hash });
Expand Down

0 comments on commit f91f217

Please sign in to comment.