From 27ed24e845b7247b7b1057914069f3e05398b53e Mon Sep 17 00:00:00 2001 From: JayJay1024 Date: Thu, 28 Mar 2024 12:30:22 +0800 Subject: [PATCH] fix: correct redeem original token --- src/bridges/xtoken-next.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/bridges/xtoken-next.ts b/src/bridges/xtoken-next.ts index 0922da65..dcc0c593 100644 --- a/src/bridges/xtoken-next.ts +++ b/src/bridges/xtoken-next.ts @@ -277,7 +277,8 @@ export class XTokenNextBridge extends BaseBridge { this.contract && this.publicClient && this.walletClient && - this.sourceToken + this.sourceToken && + this.targetToken ) { let originalSender = record.sender; if (this.sourceToken?.type === "native" || this.targetToken?.type === "native") { @@ -341,7 +342,7 @@ export class XTokenNextBridge extends BaseBridge { functionName: "rollbackBurnAndXUnlock", args: [ BigInt(this.targetChain.id), - this.sourceToken.inner, + this.targetToken.inner, originalSender, pRecipient, record.sender,