Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion modules/abstract-eth/src/abstractEthLikeNewCoins.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1706,7 +1706,7 @@ export abstract class AbstractEthLikeNewCoins extends AbstractEthLikeCoin implem
const txBuilder = this.getTransactionBuilder(params.common) as TransactionBuilder;
const txHex = buildResponse.txHex;
txBuilder.from(txHex);
if (buildResponse.walletVersion) {
if (buildResponse.walletVersion !== undefined) {
// If walletVersion is provided, set it in the txBuilder
txBuilder.walletVersion(buildResponse.walletVersion);
}
Expand Down
5 changes: 4 additions & 1 deletion modules/sdk-coin-ethlike/test/unit/ethlikeCoin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ describe('EthLike coin tests', function () {
const recoveryId = '0x1234567890abcdef';
nock(bitgo.microservicesUrl(`/api/recovery/v1/crosschain`)).get(`/${recoveryId}/buildtx`).reply(200, {
txHex: mockData.ccr[coin.name].txHex,
walletVersion: 0,
});
const walletPassphrase = TestBitGo.V2.TEST_RECOVERY_PASSCODE as string;
const params = {
Expand All @@ -75,6 +76,7 @@ describe('EthLike coin tests', function () {
const recoveryId = '0x1234567890abcdef';
nock(bitgo.microservicesUrl(`/api/recovery/v1/crosschain`)).get(`/${recoveryId}/buildtx`).reply(200, {
txHex: mockData.ccr[coin.name].txHex,
walletVersion: 0,
});
nock(bitgo.microservicesUrl(`/api/recovery/v1/crosschain`)).post(`/${recoveryId}/sign`).reply(200, {
coin: coin.name,
Expand All @@ -96,6 +98,7 @@ describe('EthLike coin tests', function () {
const recoveryId = '0x1234567890abcdef';
nock(bitgo.microservicesUrl(`/api/recovery/v1/crosschain`)).get(`/${recoveryId}/buildtx`).reply(200, {
txHex: mockData.ccr[coin.name].txHex,
walletVersion: 0,
});
const params = {
recoveryId,
Expand All @@ -112,7 +115,7 @@ describe('EthLike coin tests', function () {
coin: coin.name,
txHex: mockData.ccr[coin.name].txHex,
txid: mockData.ccr[coin.name].txid,
walletVersion: 1,
walletVersion: 0,
};

nock(bitgo.microservicesUrl(`/api/recovery/v1/crosschain`))
Expand Down
Loading