@@ -810,6 +810,44 @@ describe('V2 Wallets:', function () {
810810 walletNock . isDone ( ) . should . be . true ( ) ;
811811 } ) ;
812812
813+ it ( 'should create a new FLRP TSS custodial wallet without requiring a passphrase' , async function ( ) {
814+ const keys = [ '1' , '2' , '3' ] ;
815+ const tflrp = bitgo . coin ( 'tflrp' ) ;
816+
817+ const walletParams : GenerateWalletOptions = {
818+ label : 'flrp custodial wallet' ,
819+ enterprise : 'enterprise' ,
820+ type : 'custodial' ,
821+ // No multisigType specified — should default to 'tss' for FLRP
822+ // No passphrase — custodial wallets must not require one
823+ } ;
824+
825+ // FLRP is ECDSA, so generateCustodialMpcWallet fetches TSS settings
826+ nock ( 'https://bitgo.fakeurl' )
827+ . get ( '/api/v2/tss/settings' )
828+ . reply ( 200 , { coinSettings : { flrp : { walletCreationSettings : { } } } } ) ;
829+
830+ const walletNock = nock ( 'https://bitgo.fakeurl' )
831+ . post ( '/api/v2/tflrp/wallet/add' )
832+ . times ( 1 )
833+ . reply ( 200 , { ...walletParams , multisigType : 'tss' , keys } ) ;
834+
835+ const flrpWallets = new Wallets ( bitgo , tflrp ) ;
836+
837+ const res = await flrpWallets . generateWallet ( walletParams ) ;
838+ if ( ! isWalletWithKeychains ( res ) ) {
839+ throw new Error ( 'wallet missing required keychains' ) ;
840+ }
841+ res . wallet . label ( ) . should . equal ( walletParams . label ) ;
842+ should . equal ( res . wallet . type ( ) , walletParams . type ) ;
843+ res . wallet . multisigType ( ) . should . equal ( 'tss' ) ;
844+ res . userKeychain . id . should . equal ( keys [ 0 ] ) ;
845+ res . backupKeychain . id . should . equal ( keys [ 1 ] ) ;
846+ res . bitgoKeychain . id . should . equal ( keys [ 2 ] ) ;
847+
848+ walletNock . isDone ( ) . should . be . true ( ) ;
849+ } ) ;
850+
813851 it ( 'should create a new TSS SMC wallet' , async function ( ) {
814852 const commonKeychain = 'longstring' ;
815853 const seed = 'seed' ;
0 commit comments