@@ -2,7 +2,6 @@ import * as assert from 'assert';
22import * as sinon from 'sinon' ;
33import 'should' ;
44import { Wallet } from '../../../../src/bitgo/wallet/wallet' ;
5- import { getDerivationPath } from '@bitgo/sdk-lib-mpc' ;
65import { KeyIndices } from '../../../../src/bitgo/keychain' ;
76
87describe ( 'Wallet - TSS Address Verification with Derivation Prefix' , function ( ) {
@@ -98,11 +97,11 @@ describe('Wallet - TSS Address Verification with Derivation Prefix', function ()
9897
9998 await wallet . createAddress ( { chain : 0 } ) ;
10099
101- // Verify that custodial wallets don't use derivationPrefix
100+ // Verify that custodial wallets don't use derivedFromParentWithSeed
102101 // (their commonKeychain already accounts for the prefix)
103102 const verificationCall = mockBaseCoin . isWalletAddress . getCall ( 0 ) ;
104103 const verificationData = verificationCall . args [ 0 ] ;
105- assert . strictEqual ( verificationData . derivationPrefix , undefined ) ;
104+ assert . strictEqual ( verificationData . derivedFromParentWithSeed , undefined ) ;
106105 } ) ;
107106 } ) ;
108107
@@ -130,13 +129,12 @@ describe('Wallet - TSS Address Verification with Derivation Prefix', function ()
130129
131130 await wallet . createAddress ( { chain : 0 } ) ;
132131
133- // Verify that isWalletAddress was called with derivationPrefix from User keychain
132+ // Verify that isWalletAddress was called with derivedFromParentWithSeed from User keychain
134133 const verificationCall = mockBaseCoin . isWalletAddress . getCall ( 0 ) ;
135134 const verificationData = verificationCall . args [ 0 ] ;
136135
137- verificationData . should . have . property ( 'derivationPrefix' ) ;
138- verificationData . derivationPrefix . should . equal ( getDerivationPath ( 'test-seed-user' ) ) ;
139- verificationData . derivationPrefix . should . match ( / ^ m \/ 9 9 9 9 9 9 \/ \d + \/ \d + $ / ) ;
136+ verificationData . should . have . property ( 'derivedFromParentWithSeed' ) ;
137+ verificationData . derivedFromParentWithSeed . should . equal ( 'test-seed-user' ) ;
140138 } ) ;
141139
142140 it ( 'should handle missing derivedFromParentWithSeed gracefully for cold wallet' , async function ( ) {
@@ -160,10 +158,10 @@ describe('Wallet - TSS Address Verification with Derivation Prefix', function ()
160158
161159 await wallet . createAddress ( { chain : 0 } ) ;
162160
163- // Should not have derivationPrefix if seed is missing (no prefix used in this case)
161+ // Should not have derivedFromParentWithSeed if seed is missing
164162 const verificationCall = mockBaseCoin . isWalletAddress . getCall ( 0 ) ;
165163 const verificationData = verificationCall . args [ 0 ] ;
166- assert . strictEqual ( verificationData . derivationPrefix , undefined ) ;
164+ assert . strictEqual ( verificationData . derivedFromParentWithSeed , undefined ) ;
167165 } ) ;
168166 } ) ;
169167
@@ -192,10 +190,10 @@ describe('Wallet - TSS Address Verification with Derivation Prefix', function ()
192190
193191 await wallet . createAddress ( { chain : 0 } ) ;
194192
195- // Verify that derivationPrefix is not set for non-TSS wallets
193+ // Verify that derivedFromParentWithSeed is not set for non-TSS wallets
196194 const verificationCall = mockBaseCoin . isWalletAddress . getCall ( 0 ) ;
197195 const verificationData = verificationCall . args [ 0 ] ;
198- assert . strictEqual ( verificationData . derivationPrefix , undefined ) ;
196+ assert . strictEqual ( verificationData . derivedFromParentWithSeed , undefined ) ;
199197 } ) ;
200198 } ) ;
201199
@@ -236,8 +234,8 @@ describe('Wallet - TSS Address Verification with Derivation Prefix', function ()
236234
237235 const verificationCall = mockBaseCoin . isWalletAddress . getCall ( 0 ) ;
238236 const verificationData = verificationCall . args [ 0 ] ;
239- // Should not have derivationPrefix if USER keychain doesn't exist in keys array
240- assert . strictEqual ( verificationData . derivationPrefix , undefined ) ;
237+ // Should not have derivedFromParentWithSeed if USER keychain doesn't exist in keys array
238+ assert . strictEqual ( verificationData . derivedFromParentWithSeed , undefined ) ;
241239 } ) ;
242240
243241 it ( 'should handle pendingChainInitialization correctly' , async function ( ) {
0 commit comments