diff --git a/modules/bitgo/test/v2/unit/wallet.ts b/modules/bitgo/test/v2/unit/wallet.ts index 528e36fa62..b7fb75afa2 100644 --- a/modules/bitgo/test/v2/unit/wallet.ts +++ b/modules/bitgo/test/v2/unit/wallet.ts @@ -881,8 +881,8 @@ describe('V2 Wallet:', function () { // @ts-expect-error checking type mismatch await wallet.createAddress({ allowSkipVerifyAddress: null }).should.be.rejectedWith(message); - message = 'forwarderVersion has to be an integer 0, 1, 2 or 3'; - await wallet.createAddress({ forwarderVersion: 4 }).should.be.rejectedWith(message); + message = 'forwarderVersion has to be an integer 0, 1, 2, 3 or 4'; + await wallet.createAddress({ forwarderVersion: 5 }).should.be.rejectedWith(message); await wallet.createAddress({ forwarderVersion: -1 }).should.be.rejectedWith(message); }); diff --git a/modules/sdk-core/src/bitgo/wallet/wallet.ts b/modules/sdk-core/src/bitgo/wallet/wallet.ts index 17ce9ed8b6..b1f36f0cbb 100644 --- a/modules/sdk-core/src/bitgo/wallet/wallet.ts +++ b/modules/sdk-core/src/bitgo/wallet/wallet.ts @@ -1143,8 +1143,8 @@ export class Wallet implements IWallet { } if (!_.isUndefined(forwarderVersion)) { - if (!_.isInteger(forwarderVersion) || forwarderVersion < 0 || forwarderVersion > 3) { - throw new Error('forwarderVersion has to be an integer 0, 1, 2 or 3'); + if (!_.isInteger(forwarderVersion) || forwarderVersion < 0 || forwarderVersion > 4) { + throw new Error('forwarderVersion has to be an integer 0, 1, 2, 3 or 4'); } addressParams.forwarderVersion = forwarderVersion; } else if (this._wallet.multisigType === 'tss' && this.baseCoin.getMPCAlgorithm() === 'ecdsa') {