Skip to content

Commit 6e88c4a

Browse files
chore(abstract-eth): set walletVersion before signing
Ticket: COIN-4445 TICKET: COIN-4445
1 parent 165d4f4 commit 6e88c4a

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

modules/abstract-eth/src/abstractEthLikeNewCoins.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1377,6 +1377,10 @@ export abstract class AbstractEthLikeNewCoins extends AbstractEthLikeCoin {
13771377
const txBuilder = this.getTransactionBuilder(params.common) as TransactionBuilder;
13781378
const txHex = buildResponse.txHex;
13791379
txBuilder.from(txHex);
1380+
if (buildResponse.walletVersion) {
1381+
// If walletVersion is provided, set it in the txBuilder
1382+
txBuilder.walletVersion(buildResponse.walletVersion);
1383+
}
13801384
txBuilder
13811385
.transfer()
13821386
.coin(this.staticsCoin?.name as string)
@@ -1391,12 +1395,15 @@ export abstract class AbstractEthLikeNewCoins extends AbstractEthLikeCoin {
13911395
};
13921396
}
13931397

1394-
async buildCrossChainRecoveryTransaction(recoveryId: string): Promise<{ coin: string; txHex: string; txid: string }> {
1398+
async buildCrossChainRecoveryTransaction(
1399+
recoveryId: string
1400+
): Promise<{ coin: string; txHex: string; txid: string; walletVersion?: number }> {
13951401
const res = await this.bitgo.get(this.bitgo.microservicesUrl(`/api/recovery/v1/crosschain/${recoveryId}/buildtx`));
13961402
return {
13971403
coin: res.body.coin,
13981404
txHex: res.body.txHex,
13991405
txid: res.body.txid,
1406+
walletVersion: res.body.walletVersion,
14001407
};
14011408
}
14021409

0 commit comments

Comments
 (0)