@@ -83,11 +83,6 @@ export class MultichainAccountService {
83
83
MultichainAccountWallet < Bip44Account < KeyringAccount > >
84
84
> ;
85
85
86
- readonly #accountIdToContext: Map <
87
- Bip44Account < KeyringAccount > [ 'id' ] ,
88
- AccountContext < Bip44Account < KeyringAccount > >
89
- > ;
90
-
91
86
/**
92
87
* The name of the service.
93
88
*/
@@ -110,7 +105,6 @@ export class MultichainAccountService {
110
105
} : MultichainAccountServiceOptions ) {
111
106
this . #messenger = messenger ;
112
107
this . #wallets = new Map ( ) ;
113
- this . #accountIdToContext = new Map ( ) ;
114
108
115
109
// TODO: Rely on keyring capabilities once the keyring API is used by all keyrings.
116
110
this . #providers = [
@@ -232,7 +226,6 @@ export class MultichainAccountService {
232
226
*/
233
227
init ( ) : void {
234
228
this . #wallets. clear ( ) ;
235
- this . #accountIdToContext. clear ( ) ;
236
229
237
230
const serviceState = this . #constructServiceState( ) ;
238
231
for ( const entropySource of Object . keys ( serviceState ) ) {
@@ -243,15 +236,6 @@ export class MultichainAccountService {
243
236
} ) ;
244
237
wallet . init ( serviceState [ entropySource ] ) ;
245
238
this . #wallets. set ( wallet . id , wallet ) ;
246
-
247
- for ( const group of wallet . getMultichainAccountGroups ( ) ) {
248
- for ( const accountId of group . getAccountIds ( ) ) {
249
- this . #accountIdToContext. set ( accountId , {
250
- wallet,
251
- group,
252
- } ) ;
253
- }
254
- }
255
239
}
256
240
}
257
241
@@ -276,19 +260,6 @@ export class MultichainAccountService {
276
260
return wallet ;
277
261
}
278
262
279
- /**
280
- * Gets the account's context which contains its multichain wallet and
281
- * multichain account group references.
282
- *
283
- * @param id - Account ID.
284
- * @returns The account context if any, undefined otherwise.
285
- */
286
- getAccountContext (
287
- id : KeyringAccount [ 'id' ] ,
288
- ) : AccountContext < Bip44Account < KeyringAccount > > | undefined {
289
- return this . #accountIdToContext. get ( id ) ;
290
- }
291
-
292
263
/**
293
264
* Gets a reference to the multichain account wallet matching this entropy source.
294
265
*
0 commit comments