@@ -3,7 +3,7 @@ import * as assert from 'assert';
33import { Wallet } from '@bitgo/sdk-core' ;
44
55import { AbstractUtxoCoin , ErrorDeprecatedTxFormat , TxFormat } from '../../src' ;
6- import { getMainnetCoinName , isMainnetCoin , isTestnetCoin } from '../../src/names' ;
6+ import { isMainnetCoin , isTestnetCoin } from '../../src/names' ;
77
88import { utxoCoins , defaultBitGo } from './util' ;
99
@@ -110,42 +110,11 @@ describe('txFormat', function () {
110110 expectedTxFormat : 'psbt-lite' ,
111111 } ) ;
112112
113- // DistributedCustody wallets default to PSBT (mainnet only, testnet already covered)
113+ // All mainnet wallets default to psbt-lite
114114 runTest ( {
115- description : 'should return psbt for distributedCustody wallets on mainnet' ,
115+ description : 'should return psbt-lite for all mainnet wallets ' ,
116116 coinFilter : ( coin ) => isMainnetCoin ( coin . name ) ,
117- walletFilter : ( w ) => w . options . subType === 'distributedCustody' ,
118- expectedTxFormat : 'psbt' ,
119- } ) ;
120-
121- // MuSig2 wallets default to PSBT (mainnet only, testnet already covered)
122- runTest ( {
123- description : 'should return psbt for wallets with musigKp flag on mainnet' ,
124- coinFilter : ( coin ) => isMainnetCoin ( coin . name ) ,
125- walletFilter : ( w ) => Boolean ( w . options . walletFlags ?. some ( ( f ) => f . name === 'musigKp' && f . value === 'true' ) ) ,
126- expectedTxFormat : 'psbt' ,
127- } ) ;
128-
129- // Mainnet Bitcoin hot wallets default to PSBT
130- runTest ( {
131- description : 'should return psbt for mainnet bitcoin hot wallets' ,
132- coinFilter : ( coin ) => isMainnetCoin ( coin . name ) && getMainnetCoinName ( coin . name ) === 'btc' ,
133- walletFilter : ( w ) => w . options . type === 'hot' ,
134- expectedTxFormat : 'psbt' ,
135- } ) ;
136-
137- // Other mainnet wallets do NOT default to PSBT
138- runTest ( {
139- description : 'should return undefined for other mainnet wallets' ,
140- coinFilter : ( coin ) => isMainnetCoin ( coin . name ) ,
141- walletFilter : ( w ) => {
142- const isHotBitcoin = w . options . type === 'hot' ; // This will be bitcoin hot wallets
143- const isDistributedCustody = w . options . subType === 'distributedCustody' ;
144- const hasMusigKpFlag = Boolean ( w . options . walletFlags ?. some ( ( f ) => f . name === 'musigKp' && f . value === 'true' ) ) ;
145- // Only test "other" wallets - exclude the special cases
146- return ! isHotBitcoin && ! isDistributedCustody && ! hasMusigKpFlag ;
147- } ,
148- expectedTxFormat : undefined ,
117+ expectedTxFormat : 'psbt-lite' ,
149118 } ) ;
150119
151120 // Test explicitly requested formats
0 commit comments