diff --git a/src/libs/TransactionRecoveryApi/AxelarGMPRecoveryAPI.ts b/src/libs/TransactionRecoveryApi/AxelarGMPRecoveryAPI.ts index 1bb0a2f6..4c1e6605 100644 --- a/src/libs/TransactionRecoveryApi/AxelarGMPRecoveryAPI.ts +++ b/src/libs/TransactionRecoveryApi/AxelarGMPRecoveryAPI.ts @@ -469,7 +469,7 @@ export class AxelarGMPRecoveryAPI extends AxelarRecoveryApi { if (routeDir === RouteDir.COSMOS_TO_EVM) { return this.recoverCosmosToEvmTx(txHash, _evmWalletDetails, messageId); } else if (routeDir === RouteDir.EVM_TO_COSMOS) { - return this.recoverEvmToCosmosTx(srcChain, txHash, eventIndex); + return this.recoverEvmToCosmosTx(srcChain, txHash, eventIndex, _evmWalletDetails); } else { return this.recoverEvmToEvmTx( srcChain, @@ -495,10 +495,15 @@ export class AxelarGMPRecoveryAPI extends AxelarRecoveryApi { private async recoverEvmToCosmosTx( srcChain: string, txHash: string, - txEventIndex?: number | null + txEventIndex?: number | null, + evmWalletDetails?: EvmWalletDetails ) { // Check if the tx is confirmed on the source chain - const isConfirmed = await this.doesTxMeetConfirmHt(srcChain, txHash); + const isConfirmed = await this.doesTxMeetConfirmHt( + srcChain, + txHash, + evmWalletDetails?.provider + ); if (!isConfirmed) { const minConfirmLevel = await this.axelarQueryApi.getConfirmationHeight(srcChain); return { diff --git a/src/libs/test/TransactionRecoveryAPI/AxelarGMPRecoveryAPI.spec.ts b/src/libs/test/TransactionRecoveryAPI/AxelarGMPRecoveryAPI.spec.ts index 52ee5c04..ce4ab262 100644 --- a/src/libs/test/TransactionRecoveryAPI/AxelarGMPRecoveryAPI.spec.ts +++ b/src/libs/test/TransactionRecoveryAPI/AxelarGMPRecoveryAPI.spec.ts @@ -99,7 +99,7 @@ describe("AxelarGMPRecoveryAPI", () => { undefined ); expect(mockConfirmGatewayTx).toHaveBeenCalledWith(txHash, EvmChain.AVALANCHE); - expect(mockDoesTxMeetConfirmHt).toHaveBeenCalledWith(EvmChain.AVALANCHE, txHash); + expect(mockDoesTxMeetConfirmHt).toHaveBeenCalledWith(EvmChain.AVALANCHE, txHash, undefined); expect(response).toBeDefined(); expect(response.infoLogs.length).toBeGreaterThan(0); expect(response.eventResponse).toBeDefined(); @@ -166,7 +166,7 @@ describe("AxelarGMPRecoveryAPI", () => { ); expect(mockConfirmGatewayTx).toBeCalledTimes(0); - expect(mockDoesTxMeetConfirmHt).toHaveBeenCalledWith(EvmChain.AVALANCHE, txHash); + expect(mockDoesTxMeetConfirmHt).toHaveBeenCalledWith(EvmChain.AVALANCHE, txHash, undefined); expect(response.success).toBeFalsy(); expect(response.eventResponse).toBeDefined(); expect(response.commandId).toBe("commandId"); @@ -199,7 +199,7 @@ describe("AxelarGMPRecoveryAPI", () => { ); expect(mockConfirmGatewayTx).toHaveBeenCalledWith(txHash, EvmChain.AVALANCHE); - expect(mockDoesTxMeetConfirmHt).toHaveBeenCalledWith(EvmChain.AVALANCHE, txHash); + expect(mockDoesTxMeetConfirmHt).toHaveBeenCalledWith(EvmChain.AVALANCHE, txHash, undefined); expect(response.success).toBeFalsy(); expect(response.eventResponse).toBeDefined(); expect(response.commandId).toBe("commandId");