@@ -2070,7 +2070,7 @@ describe('V2 Wallet:', function () {
20702070 getKeyNock . isDone ( ) . should . be . True ( ) ;
20712071 } ) ;
20722072
2073- describe ( 'OFC Multi-User -Key Wallet Sharing' , function ( ) {
2073+ describe ( 'OFC multi-key-user -Key Wallet Sharing' , function ( ) {
20742074 const userId = '123' ;
20752075 const email = '[email protected] ' ; 20762076 const permissions = 'view,spend' ;
@@ -2081,7 +2081,7 @@ describe('V2 Wallet:', function () {
20812081 before ( function ( ) {
20822082 const ofcCoin = bitgo . coin ( 'ofc' ) ;
20832083
2084- // Regular OFC wallet without multi-user-key feature
2084+ // Regular OFC wallet without multi-key- user-key feature
20852085 const regularOfcWalletData = {
20862086 id : '5b34252f1bf349930e3400c00000000' ,
20872087 coin : 'ofc' ,
@@ -2096,24 +2096,20 @@ describe('V2 Wallet:', function () {
20962096 } as any ;
20972097 ofcWallet = new Wallet ( bitgo , ofcCoin , regularOfcWalletData ) ;
20982098
2099- // OFC wallet with multi-user-key feature
2099+ // OFC wallet with multi-key- user-key feature
21002100 const multiUserKeyWalletData = {
21012101 id : '5b34252f1bf349930e3400d00000000' ,
21022102 coin : 'ofc' ,
2103- keys : [
2104- '5b3424f91bf349930e34018400000000' ,
2105- '5b3424f91bf349930e34018500000000' ,
2106- '5b3424f91bf349930e34018600000000' ,
2107- ] ,
2103+ keys : [ '5b3424f91bf349930e34018400000000' ] ,
21082104 coinSpecific : {
2109- features : [ 'multi-user-key' ] ,
2105+ features : [ 'multi-key- user-key' ] ,
21102106 } ,
21112107 multisigType : 'onchain' ,
21122108 type : 'hot' ,
21132109 } as any ;
21142110 ofcMultiUserKeyWallet = new Wallet ( bitgo , ofcCoin , multiUserKeyWalletData ) ;
21152111
2116- // Non-multi-user-key wallet for backwards compatibility tests
2112+ // Non-multi-key- user-key wallet for backwards compatibility tests
21172113 const nonMultiUserKeyWalletData = {
21182114 id : '5b34252f1bf349930e34020a00000003' ,
21192115 coin : 'ofc' ,
@@ -2132,7 +2128,7 @@ describe('V2 Wallet:', function () {
21322128 } ) ;
21332129
21342130 describe ( 'createShare method' , function ( ) {
2135- describe ( 'multi-user-key wallets' , function ( ) {
2131+ describe ( 'multi-key- user-key wallets' , function ( ) {
21362132 it ( 'should exclude keychain property from API request' , async function ( ) {
21372133 const createShareParams = {
21382134 user : userId ,
@@ -2168,7 +2164,7 @@ describe('V2 Wallet:', function () {
21682164
21692165 await ofcMultiUserKeyWallet
21702166 . createShare ( createShareParams )
2171- . should . be . rejectedWith ( 'keychain property must not be provided for multi-user-key wallets' ) ;
2167+ . should . be . rejectedWith ( 'keychain property must not be provided for multi-key- user-key wallets' ) ;
21722168 } ) ;
21732169
21742170 it ( 'should omit keychain from request even when empty object is provided' , async function ( ) {
@@ -2193,7 +2189,7 @@ describe('V2 Wallet:', function () {
21932189 } ) ;
21942190 } ) ;
21952191
2196- describe ( 'non-multi-user-key wallets' , function ( ) {
2192+ describe ( 'non-multi-key- user-key wallets' , function ( ) {
21972193 it ( 'should include keychain property in API request when provided' , async function ( ) {
21982194 const createShareParams = {
21992195 user : userId ,
@@ -2229,7 +2225,7 @@ describe('V2 Wallet:', function () {
22292225 } ) ;
22302226
22312227 describe ( 'shareWallet method' , function ( ) {
2232- describe ( 'multi-user-key wallets' , function ( ) {
2228+ describe ( 'multi-key- user-key wallets' , function ( ) {
22332229 it ( 'should skip keychain preparation and set skipKeychain=true in API request' , async function ( ) {
22342230 const getSharingKeyNock = nock ( bgUrl )
22352231 . post ( '/api/v1/user/sharingkey' , { email } )
@@ -2284,7 +2280,7 @@ describe('V2 Wallet:', function () {
22842280 } ) ;
22852281 } ) ;
22862282
2287- describe ( 'non-multi-user-key wallets' , function ( ) {
2283+ describe ( 'non-multi-key- user-key wallets' , function ( ) {
22882284 it ( 'should include keychain when wallet passphrase is provided' , async function ( ) {
22892285 const toKeychain = utxoLib . bip32 . fromSeed ( Buffer . from ( 'deadbeef02deadbeef02deadbeef02deadbeef02' , 'hex' ) ) ;
22902286 const path = 'm/999999/1/1' ;
@@ -2307,7 +2303,7 @@ describe('V2 Wallet:', function () {
23072303 } ) ;
23082304
23092305 const createShareStub = sinon . stub ( nonMultiUserKeyWallet , 'createShare' ) . callsFake ( async ( options ) => {
2310- // For non-multi-user-key wallets, keychain should be present when spend permissions are included
2306+ // For non-multi-key- user-key wallets, keychain should be present when spend permissions are included
23112307 options ! . keychain ! . should . not . be . undefined ( ) ;
23122308 options ! . keychain ! . pub ! . should . equal ( pub ) ;
23132309 return undefined ;
@@ -2322,15 +2318,15 @@ describe('V2 Wallet:', function () {
23222318 } ) ;
23232319 } ) ;
23242320
2325- describe ( 'multi-user-key detection' , function ( ) {
2326- it ( 'should detect multi-user-key wallet via coinSpecific.features array' , async function ( ) {
2321+ describe ( 'multi-key- user-key detection' , function ( ) {
2322+ it ( 'should detect multi-key- user-key wallet via coinSpecific.features array' , async function ( ) {
23272323 const ofcCoin : any = bitgo . coin ( 'ofc' ) ;
23282324 const walletWithMultiUserKeyFeature = new Wallet ( bitgo , ofcCoin , {
23292325 id : '5b34252f1bf349930e34020a00000004' ,
23302326 coin : 'ofc' ,
23312327 keys : [ '5b3424f91bf349930e34017500000003' ] ,
23322328 coinSpecific : {
2333- features : [ 'multi-user-key' ] ,
2329+ features : [ 'multi-key- user-key' ] ,
23342330 } ,
23352331 type : 'hot' ,
23362332 } ) ;
@@ -2358,7 +2354,7 @@ describe('V2 Wallet:', function () {
23582354 . times ( 3 )
23592355 . reply ( 200 , { userId, pubkey : 'testpubkey' , path : 'm/999999/1/1' } ) ;
23602356
2361- // Multi-user-key wallet should skip keychain
2357+ // Multi-key- user-key wallet should skip keychain
23622358 const getEncryptedUserKeychainStub1 = sinon . stub ( walletWithMultiUserKeyFeature , 'getEncryptedUserKeychain' ) ;
23632359 getEncryptedUserKeychainStub1 . rejects ( new Error ( 'getEncryptedUserKeychain should not be called' ) ) ;
23642360 const createShareStub1 = sinon
@@ -2371,14 +2367,14 @@ describe('V2 Wallet:', function () {
23712367 getEncryptedUserKeychainStub1 . called . should . be . false ( ) ;
23722368 createShareStub1 . calledOnce . should . be . true ( ) ;
23732369
2374- // Wallet without multi-user-key feature should respect skipKeychain flag
2370+ // Wallet without multi-key- user-key feature should respect skipKeychain flag
23752371 const createShareStub2 = sinon . stub ( walletWithoutFeature , 'createShare' ) . callsFake ( async ( options ) => {
23762372 return undefined ;
23772373 } ) ;
23782374 await walletWithoutFeature . shareWallet ( { email, permissions, skipKeychain : true } ) ;
23792375 createShareStub2 . calledOnce . should . be . true ( ) ;
23802376
2381- // Wallet without coinSpecific should not be detected as multi-user-key
2377+ // Wallet without coinSpecific should not be detected as multi-key- user-key
23822378 const createShareStub3 = sinon . stub ( walletWithoutCoinSpecific , 'createShare' ) . callsFake ( async ( options ) => {
23832379 return undefined ;
23842380 } ) ;
0 commit comments