Skip to content

Commit 28fa948

Browse files
authored
Merge pull request #5065 from BitGo/wallet-version-6
2 parents b5dc1c1 + 6ac4ba3 commit 28fa948

File tree

1 file changed

+13
-6
lines changed

1 file changed

+13
-6
lines changed

modules/sdk-core/src/bitgo/wallet/wallets.ts

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -291,22 +291,29 @@ export class Wallets implements IWallets {
291291
walletParams.enterprise = enterprise;
292292
}
293293

294-
// EVM TSS wallets must use wallet version 3 and 5
295-
if (isTss && this.baseCoin.isEVM() && !(params.walletVersion === 3 || params.walletVersion === 5)) {
296-
throw new Error('EVM TSS wallets are only supported for wallet version 3 and 5');
294+
// EVM TSS wallets must use wallet version 3, 5 and 6
295+
if (
296+
isTss &&
297+
this.baseCoin.isEVM() &&
298+
!(params.walletVersion === 3 || params.walletVersion === 5 || params.walletVersion === 6)
299+
) {
300+
throw new Error('EVM TSS wallets are only supported for wallet version 3, 5 and 6');
297301
}
298302

299303
if (isTss) {
300304
if (!this.baseCoin.supportsTss()) {
301305
throw new Error(`coin ${this.baseCoin.getFamily()} does not support TSS at this time`);
302306
}
303-
if (params.walletVersion === 5 && !this.baseCoin.getConfig().features.includes(CoinFeature.MPCV2)) {
307+
if (
308+
(params.walletVersion === 5 || params.walletVersion === 6) &&
309+
!this.baseCoin.getConfig().features.includes(CoinFeature.MPCV2)
310+
) {
304311
throw new Error(`coin ${this.baseCoin.getFamily()} does not support TSS MPCv2 at this time`);
305312
}
306313
assert(enterprise, 'enterprise is required for TSS wallet');
307314

308315
if (type === 'cold') {
309-
if (params.walletVersion === 5) {
316+
if (params.walletVersion === 5 || params.walletVersion === 6) {
310317
throw new Error('EVM TSS MPCv2 wallets are not supported for cold wallets');
311318
}
312319
// validate
@@ -324,7 +331,7 @@ export class Wallets implements IWallets {
324331
}
325332

326333
if (type === 'custodial') {
327-
if (params.walletVersion === 5) {
334+
if (params.walletVersion === 5 || params.walletVersion === 6) {
328335
throw new Error('EVM TSS MPCv2 wallets are not supported for custodial wallets');
329336
}
330337
return this.generateCustodialMpcWallet({

0 commit comments

Comments
 (0)