File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
packages/account-tree-controller/src Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -420,7 +420,8 @@ export class AccountTreeController extends BaseController<
420
420
421
421
// Apply persisted name if available (including empty strings)
422
422
if ( persistedGroupMetadata ?. name !== undefined ) {
423
- group . metadata . name = persistedGroupMetadata . name . value ;
423
+ state . accountTree . wallets [ walletId ] . groups [ groupId ] . metadata . name =
424
+ persistedGroupMetadata . name . value ;
424
425
} else if ( ! group . metadata . name ) {
425
426
// Get the appropriate rule for this wallet type
426
427
const rule = this . #getRuleForWallet( wallet ) ;
@@ -433,7 +434,8 @@ export class AccountTreeController extends BaseController<
433
434
const computedName = rule . getComputedAccountGroupName ( typedGroup ) ;
434
435
435
436
if ( computedName ) {
436
- group . metadata . name = computedName ;
437
+ state . accountTree . wallets [ walletId ] . groups [ groupId ] . metadata . name =
438
+ computedName ;
437
439
} else {
438
440
// Generate default name and ensure it's unique within the wallet
439
441
let proposedName = '' ;
@@ -498,7 +500,8 @@ export class AccountTreeController extends BaseController<
498
500
}
499
501
} while ( nameExists ) ;
500
502
501
- group . metadata . name = proposedName ;
503
+ state . accountTree . wallets [ walletId ] . groups [ groupId ] . metadata . name =
504
+ proposedName ;
502
505
503
506
// Persist the generated name to ensure consistency
504
507
state . accountGroupsMetadata [ group . id ] ??= { } ;
You can’t perform that action at this time.
0 commit comments