@metamask-previews/account-tree-controller 1.5.0-preview-887b5d5c → 1.5.0-preview-35a5c8a7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +2 -0
- package/dist/AccountTreeController.cjs +38 -57
- package/dist/AccountTreeController.cjs.map +1 -1
- package/dist/AccountTreeController.d.cts +1 -1
- package/dist/AccountTreeController.d.cts.map +1 -1
- package/dist/AccountTreeController.d.mts +1 -1
- package/dist/AccountTreeController.d.mts.map +1 -1
- package/dist/AccountTreeController.mjs +37 -56
- package/dist/AccountTreeController.mjs.map +1 -1
- package/dist/types.cjs.map +1 -1
- package/dist/types.d.cts +4 -7
- package/dist/types.d.cts.map +1 -1
- package/dist/types.d.mts +4 -7
- package/dist/types.d.mts.map +1 -1
- package/dist/types.mjs.map +1 -1
- package/package.json +2 -1
package/CHANGELOG.md
CHANGED
|
@@ -11,6 +11,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
11
11
|
|
|
12
12
|
### Changed
|
|
13
13
|
|
|
14
|
+
- **BREAKING:** Use new `Messenger` from `@metamask/messenger` ([#6380](https://github.com/MetaMask/core/pull/6380))
|
|
15
|
+
- Previously, `AccountTreeController` accepted a `RestrictedMessenger` instance from `@metamask/base-controller`.
|
|
14
16
|
- Use non-EVM account names for group names ([#6831](https://github.com/MetaMask/core/pull/6831))
|
|
15
17
|
- EVM accounts still take precedence over non-EVM accounts.
|
|
16
18
|
- Before accounts get re-aligned, it is possible that a group contains only non-EVM accounts, in which case, the first non-EVM account name will be used for that account group.
|
|
@@ -10,11 +10,11 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
10
10
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
11
11
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
12
12
|
};
|
|
13
|
-
var _AccountTreeController_instances, _AccountTreeController_accountIdToContext, _AccountTreeController_groupIdToWalletId, _AccountTreeController_backupAndSyncService, _AccountTreeController_rules, _AccountTreeController_trace, _AccountTreeController_backupAndSyncConfig,
|
|
13
|
+
var _AccountTreeController_instances, _AccountTreeController_accountIdToContext, _AccountTreeController_groupIdToWalletId, _AccountTreeController_backupAndSyncService, _AccountTreeController_rules, _AccountTreeController_trace, _AccountTreeController_backupAndSyncConfig, _AccountTreeController_initialized, _AccountTreeController_getEntropyRule, _AccountTreeController_getSnapRule, _AccountTreeController_getKeyringRule, _AccountTreeController_applyAccountWalletMetadata, _AccountTreeController_getRuleForWallet, _AccountTreeController_getComputedAccountGroupName, _AccountTreeController_getDefaultAccountGroupName, _AccountTreeController_applyAccountGroupMetadata, _AccountTreeController_handleAccountAdded, _AccountTreeController_handleAccountRemoved, _AccountTreeController_pruneEmptyGroupAndWallet, _AccountTreeController_insert, _AccountTreeController_listAccounts, _AccountTreeController_assertAccountGroupExists, _AccountTreeController_assertAccountWalletExists, _AccountTreeController_assertAccountGroupNameIsUnique, _AccountTreeController_getDefaultSelectedAccountGroup, _AccountTreeController_handleSelectedAccountChange, _AccountTreeController_handleMultichainAccountWalletStatusChange, _AccountTreeController_getAccountGroup, _AccountTreeController_getDefaultAccountFromAccountGroupId, _AccountTreeController_getDefaultAccountGroupId, _AccountTreeController_registerMessageHandlers, _AccountTreeController_createBackupAndSyncContext;
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
15
|
exports.AccountTreeController = exports.getDefaultAccountTreeControllerState = exports.controllerName = void 0;
|
|
16
16
|
const account_api_1 = require("@metamask/account-api");
|
|
17
|
-
const
|
|
17
|
+
const next_1 = require("@metamask/base-controller/next");
|
|
18
18
|
const keyring_api_1 = require("@metamask/keyring-api");
|
|
19
19
|
const utils_1 = require("@metamask/utils");
|
|
20
20
|
const analytics_1 = require("./backup-and-sync/analytics/index.cjs");
|
|
@@ -29,31 +29,31 @@ const accountTreeControllerMetadata = {
|
|
|
29
29
|
accountTree: {
|
|
30
30
|
includeInStateLogs: true,
|
|
31
31
|
persist: false,
|
|
32
|
-
|
|
32
|
+
includeInDebugSnapshot: false,
|
|
33
33
|
usedInUi: true,
|
|
34
34
|
},
|
|
35
35
|
isAccountTreeSyncingInProgress: {
|
|
36
36
|
includeInStateLogs: false,
|
|
37
37
|
persist: false,
|
|
38
|
-
|
|
38
|
+
includeInDebugSnapshot: false,
|
|
39
39
|
usedInUi: true,
|
|
40
40
|
},
|
|
41
41
|
hasAccountTreeSyncingSyncedAtLeastOnce: {
|
|
42
42
|
includeInStateLogs: true,
|
|
43
43
|
persist: true,
|
|
44
|
-
|
|
44
|
+
includeInDebugSnapshot: false,
|
|
45
45
|
usedInUi: true,
|
|
46
46
|
},
|
|
47
47
|
accountGroupsMetadata: {
|
|
48
48
|
includeInStateLogs: true,
|
|
49
49
|
persist: true,
|
|
50
|
-
|
|
50
|
+
includeInDebugSnapshot: false,
|
|
51
51
|
usedInUi: true,
|
|
52
52
|
},
|
|
53
53
|
accountWalletsMetadata: {
|
|
54
54
|
includeInStateLogs: true,
|
|
55
55
|
persist: true,
|
|
56
|
-
|
|
56
|
+
includeInDebugSnapshot: false,
|
|
57
57
|
usedInUi: true,
|
|
58
58
|
},
|
|
59
59
|
};
|
|
@@ -75,7 +75,7 @@ function getDefaultAccountTreeControllerState() {
|
|
|
75
75
|
};
|
|
76
76
|
}
|
|
77
77
|
exports.getDefaultAccountTreeControllerState = getDefaultAccountTreeControllerState;
|
|
78
|
-
class AccountTreeController extends
|
|
78
|
+
class AccountTreeController extends next_1.BaseController {
|
|
79
79
|
/**
|
|
80
80
|
* Constructor for AccountTreeController.
|
|
81
81
|
*
|
|
@@ -104,10 +104,6 @@ class AccountTreeController extends base_controller_1.BaseController {
|
|
|
104
104
|
_AccountTreeController_rules.set(this, void 0);
|
|
105
105
|
_AccountTreeController_trace.set(this, void 0);
|
|
106
106
|
_AccountTreeController_backupAndSyncConfig.set(this, void 0);
|
|
107
|
-
/**
|
|
108
|
-
* Callbacks to migrate hidden and pinned account information from the account order controller
|
|
109
|
-
*/
|
|
110
|
-
_AccountTreeController_accountOrderCallbacks.set(this, void 0);
|
|
111
107
|
_AccountTreeController_initialized.set(this, void 0);
|
|
112
108
|
// This will be set to true upon the first `init` call.
|
|
113
109
|
__classPrivateFieldSet(this, _AccountTreeController_initialized, false, "f");
|
|
@@ -118,11 +114,11 @@ class AccountTreeController extends base_controller_1.BaseController {
|
|
|
118
114
|
// Rules to apply to construct the wallets tree.
|
|
119
115
|
__classPrivateFieldSet(this, _AccountTreeController_rules, [
|
|
120
116
|
// 1. We group by entropy-source
|
|
121
|
-
new entropy_1.EntropyRule(this.
|
|
117
|
+
new entropy_1.EntropyRule(this.messenger),
|
|
122
118
|
// 2. We group by Snap ID
|
|
123
|
-
new snap_1.SnapRule(this.
|
|
119
|
+
new snap_1.SnapRule(this.messenger),
|
|
124
120
|
// 3. We group by wallet type (this rule cannot fail and will group all non-matching accounts)
|
|
125
|
-
new keyring_1.KeyringRule(this.
|
|
121
|
+
new keyring_1.KeyringRule(this.messenger),
|
|
126
122
|
], "f");
|
|
127
123
|
// Initialize trace function
|
|
128
124
|
__classPrivateFieldSet(this, _AccountTreeController_trace, config?.trace ?? analytics_1.traceFallback, "f");
|
|
@@ -133,22 +129,21 @@ class AccountTreeController extends base_controller_1.BaseController {
|
|
|
133
129
|
config.backupAndSync.onBackupAndSyncEvent((0, analytics_1.formatAnalyticsEvent)(event)));
|
|
134
130
|
},
|
|
135
131
|
}, "f");
|
|
136
|
-
__classPrivateFieldSet(this, _AccountTreeController_accountOrderCallbacks, config?.accountOrderCallbacks, "f");
|
|
137
132
|
// Initialize the backup and sync service
|
|
138
133
|
__classPrivateFieldSet(this, _AccountTreeController_backupAndSyncService, new service_1.BackupAndSyncService(__classPrivateFieldGet(this, _AccountTreeController_instances, "m", _AccountTreeController_createBackupAndSyncContext).call(this)), "f");
|
|
139
|
-
this.
|
|
134
|
+
this.messenger.subscribe('AccountsController:accountAdded', (account) => {
|
|
140
135
|
__classPrivateFieldGet(this, _AccountTreeController_instances, "m", _AccountTreeController_handleAccountAdded).call(this, account);
|
|
141
136
|
});
|
|
142
|
-
this.
|
|
137
|
+
this.messenger.subscribe('AccountsController:accountRemoved', (accountId) => {
|
|
143
138
|
__classPrivateFieldGet(this, _AccountTreeController_instances, "m", _AccountTreeController_handleAccountRemoved).call(this, accountId);
|
|
144
139
|
});
|
|
145
|
-
this.
|
|
140
|
+
this.messenger.subscribe('AccountsController:selectedAccountChange', (account) => {
|
|
146
141
|
__classPrivateFieldGet(this, _AccountTreeController_instances, "m", _AccountTreeController_handleSelectedAccountChange).call(this, account);
|
|
147
142
|
});
|
|
148
|
-
this.
|
|
143
|
+
this.messenger.subscribe('UserStorageController:stateChange', (userStorageControllerState) => {
|
|
149
144
|
__classPrivateFieldGet(this, _AccountTreeController_backupAndSyncService, "f").handleUserStorageStateChange(userStorageControllerState);
|
|
150
145
|
});
|
|
151
|
-
this.
|
|
146
|
+
this.messenger.subscribe('MultichainAccountService:walletStatusChange', (walletId, status) => {
|
|
152
147
|
__classPrivateFieldGet(this, _AccountTreeController_instances, "m", _AccountTreeController_handleMultichainAccountWalletStatusChange).call(this, walletId, status);
|
|
153
148
|
});
|
|
154
149
|
__classPrivateFieldGet(this, _AccountTreeController_instances, "m", _AccountTreeController_registerMessageHandlers).call(this);
|
|
@@ -237,7 +232,7 @@ class AccountTreeController extends base_controller_1.BaseController {
|
|
|
237
232
|
if (previousSelectedAccountGroup !==
|
|
238
233
|
this.state.accountTree.selectedAccountGroup) {
|
|
239
234
|
(0, logger_1.projectLogger)(`Selected (initial) group is: [${this.state.accountTree.selectedAccountGroup}]`);
|
|
240
|
-
this.
|
|
235
|
+
this.messenger.publish(`${exports.controllerName}:selectedAccountGroupChange`, this.state.accountTree.selectedAccountGroup, previousSelectedAccountGroup);
|
|
241
236
|
}
|
|
242
237
|
(0, logger_1.projectLogger)('Initialized!');
|
|
243
238
|
__classPrivateFieldSet(this, _AccountTreeController_initialized, true, "f");
|
|
@@ -298,7 +293,7 @@ class AccountTreeController extends base_controller_1.BaseController {
|
|
|
298
293
|
}
|
|
299
294
|
const accounts = [];
|
|
300
295
|
for (const id of group.accounts) {
|
|
301
|
-
const account = this.
|
|
296
|
+
const account = this.messenger.call('AccountsController:getAccount', id);
|
|
302
297
|
// For now, we're filtering undefined account, but I believe
|
|
303
298
|
// throwing would be more appropriate here.
|
|
304
299
|
if (account) {
|
|
@@ -350,10 +345,10 @@ class AccountTreeController extends base_controller_1.BaseController {
|
|
|
350
345
|
state.accountTree.selectedAccountGroup = groupId;
|
|
351
346
|
});
|
|
352
347
|
(0, logger_1.projectLogger)(`Selected group is now: [${this.state.accountTree.selectedAccountGroup}]`);
|
|
353
|
-
this.
|
|
348
|
+
this.messenger.publish(`${exports.controllerName}:selectedAccountGroupChange`, groupId, previousSelectedAccountGroup);
|
|
354
349
|
// Update AccountsController - this will trigger selectedAccountChange event,
|
|
355
350
|
// but our handler is idempotent so it won't cause infinite loop
|
|
356
|
-
this.
|
|
351
|
+
this.messenger.call('AccountsController:setSelectedAccount', accountToSelect);
|
|
357
352
|
}
|
|
358
353
|
/**
|
|
359
354
|
* Resolves name conflicts by adding a suffix to make the name unique.
|
|
@@ -560,7 +555,7 @@ class AccountTreeController extends base_controller_1.BaseController {
|
|
|
560
555
|
}
|
|
561
556
|
}
|
|
562
557
|
exports.AccountTreeController = AccountTreeController;
|
|
563
|
-
_AccountTreeController_accountIdToContext = new WeakMap(), _AccountTreeController_groupIdToWalletId = new WeakMap(), _AccountTreeController_backupAndSyncService = new WeakMap(), _AccountTreeController_rules = new WeakMap(), _AccountTreeController_trace = new WeakMap(), _AccountTreeController_backupAndSyncConfig = new WeakMap(),
|
|
558
|
+
_AccountTreeController_accountIdToContext = new WeakMap(), _AccountTreeController_groupIdToWalletId = new WeakMap(), _AccountTreeController_backupAndSyncService = new WeakMap(), _AccountTreeController_rules = new WeakMap(), _AccountTreeController_trace = new WeakMap(), _AccountTreeController_backupAndSyncConfig = new WeakMap(), _AccountTreeController_initialized = new WeakMap(), _AccountTreeController_instances = new WeakSet(), _AccountTreeController_getEntropyRule = function _AccountTreeController_getEntropyRule() {
|
|
564
559
|
return __classPrivateFieldGet(this, _AccountTreeController_rules, "f")[0];
|
|
565
560
|
}, _AccountTreeController_getSnapRule = function _AccountTreeController_getSnapRule() {
|
|
566
561
|
return __classPrivateFieldGet(this, _AccountTreeController_rules, "f")[1];
|
|
@@ -601,7 +596,7 @@ _AccountTreeController_accountIdToContext = new WeakMap(), _AccountTreeControlle
|
|
|
601
596
|
}, _AccountTreeController_getComputedAccountGroupName = function _AccountTreeController_getComputedAccountGroupName(wallet, group) {
|
|
602
597
|
let proposedName = ''; // Empty means there's no computed name for this group.
|
|
603
598
|
for (const id of group.accounts) {
|
|
604
|
-
const account = this.
|
|
599
|
+
const account = this.messenger.call('AccountsController:getAccount', id);
|
|
605
600
|
if (!account || !account.metadata.name.length) {
|
|
606
601
|
continue;
|
|
607
602
|
}
|
|
@@ -716,23 +711,9 @@ _AccountTreeController_accountIdToContext = new WeakMap(), _AccountTreeControlle
|
|
|
716
711
|
if (persistedGroupMetadata?.pinned?.value !== undefined) {
|
|
717
712
|
group.metadata.pinned = persistedGroupMetadata.pinned.value;
|
|
718
713
|
}
|
|
719
|
-
else if (__classPrivateFieldGet(this, _AccountTreeController_accountOrderCallbacks, "f")?.isPinnedAccount) {
|
|
720
|
-
// If any accounts was previously pinned, then we consider the group to be pinned as well.
|
|
721
|
-
group.metadata.pinned = Object.values(group.accounts).some((account) => __classPrivateFieldGet(this, _AccountTreeController_accountOrderCallbacks, "f")?.isPinnedAccount?.(account));
|
|
722
|
-
}
|
|
723
|
-
else {
|
|
724
|
-
group.metadata.pinned = false;
|
|
725
|
-
}
|
|
726
714
|
if (persistedGroupMetadata?.hidden?.value !== undefined) {
|
|
727
715
|
group.metadata.hidden = persistedGroupMetadata.hidden.value;
|
|
728
716
|
}
|
|
729
|
-
else if (__classPrivateFieldGet(this, _AccountTreeController_accountOrderCallbacks, "f")?.isHiddenAccount) {
|
|
730
|
-
// If any accounts was previously hidden, then we consider the group to be hidden as well.
|
|
731
|
-
group.metadata.hidden = Object.values(group.accounts).some((account) => __classPrivateFieldGet(this, _AccountTreeController_accountOrderCallbacks, "f")?.isHiddenAccount?.(account));
|
|
732
|
-
}
|
|
733
|
-
else {
|
|
734
|
-
group.metadata.hidden = false;
|
|
735
|
-
}
|
|
736
717
|
}, _AccountTreeController_handleAccountAdded = function _AccountTreeController_handleAccountAdded(account) {
|
|
737
718
|
// We wait for the first `init` to be called to actually build up the tree and
|
|
738
719
|
// mutate it. We expect the caller to first update the `AccountsController` state
|
|
@@ -754,7 +735,7 @@ _AccountTreeController_accountIdToContext = new WeakMap(), _AccountTreeControlle
|
|
|
754
735
|
}
|
|
755
736
|
}
|
|
756
737
|
});
|
|
757
|
-
this.
|
|
738
|
+
this.messenger.publish(`${exports.controllerName}:accountTreeChange`, this.state.accountTree);
|
|
758
739
|
}
|
|
759
740
|
}, _AccountTreeController_handleAccountRemoved = function _AccountTreeController_handleAccountRemoved(accountId) {
|
|
760
741
|
// We wait for the first `init` to be called to actually build up the tree and
|
|
@@ -789,10 +770,10 @@ _AccountTreeController_accountIdToContext = new WeakMap(), _AccountTreeControlle
|
|
|
789
770
|
}
|
|
790
771
|
}
|
|
791
772
|
});
|
|
792
|
-
this.
|
|
773
|
+
this.messenger.publish(`${exports.controllerName}:accountTreeChange`, this.state.accountTree);
|
|
793
774
|
// Emit selectedAccountGroupChange event if the selected group changed
|
|
794
775
|
if (selectedAccountGroupChanged) {
|
|
795
|
-
this.
|
|
776
|
+
this.messenger.publish(`${exports.controllerName}:selectedAccountGroupChange`, this.state.accountTree.selectedAccountGroup, previousSelectedAccountGroup);
|
|
796
777
|
}
|
|
797
778
|
// Clear reverse-mapping for that account.
|
|
798
779
|
__classPrivateFieldGet(this, _AccountTreeController_accountIdToContext, "f").delete(accountId);
|
|
@@ -887,7 +868,7 @@ _AccountTreeController_accountIdToContext = new WeakMap(), _AccountTreeControlle
|
|
|
887
868
|
sortOrder,
|
|
888
869
|
});
|
|
889
870
|
}, _AccountTreeController_listAccounts = function _AccountTreeController_listAccounts() {
|
|
890
|
-
return this.
|
|
871
|
+
return this.messenger.call('AccountsController:listMultichainAccounts');
|
|
891
872
|
}, _AccountTreeController_assertAccountGroupExists = function _AccountTreeController_assertAccountGroupExists(groupId) {
|
|
892
873
|
const exists = __classPrivateFieldGet(this, _AccountTreeController_groupIdToWalletId, "f").has(groupId);
|
|
893
874
|
if (!exists) {
|
|
@@ -903,7 +884,7 @@ _AccountTreeController_accountIdToContext = new WeakMap(), _AccountTreeControlle
|
|
|
903
884
|
throw new Error('Account group name already exists');
|
|
904
885
|
}
|
|
905
886
|
}, _AccountTreeController_getDefaultSelectedAccountGroup = function _AccountTreeController_getDefaultSelectedAccountGroup(wallets) {
|
|
906
|
-
const selectedAccount = this.
|
|
887
|
+
const selectedAccount = this.messenger.call('AccountsController:getSelectedMultichainAccount');
|
|
907
888
|
if (selectedAccount && selectedAccount.id) {
|
|
908
889
|
const accountMapping = __classPrivateFieldGet(this, _AccountTreeController_accountIdToContext, "f").get(selectedAccount.id);
|
|
909
890
|
if (accountMapping) {
|
|
@@ -929,7 +910,7 @@ _AccountTreeController_accountIdToContext = new WeakMap(), _AccountTreeControlle
|
|
|
929
910
|
this.update((state) => {
|
|
930
911
|
state.accountTree.selectedAccountGroup = groupId;
|
|
931
912
|
});
|
|
932
|
-
this.
|
|
913
|
+
this.messenger.publish(`${exports.controllerName}:selectedAccountGroupChange`, groupId, previousSelectedAccountGroup);
|
|
933
914
|
}, _AccountTreeController_handleMultichainAccountWalletStatusChange = function _AccountTreeController_handleMultichainAccountWalletStatusChange(walletId, walletStatus) {
|
|
934
915
|
this.update((state) => {
|
|
935
916
|
const wallet = state.accountTree.wallets[walletId];
|
|
@@ -945,7 +926,7 @@ _AccountTreeController_accountIdToContext = new WeakMap(), _AccountTreeControlle
|
|
|
945
926
|
if (group) {
|
|
946
927
|
let candidate;
|
|
947
928
|
for (const id of group.accounts) {
|
|
948
|
-
const account = this.
|
|
929
|
+
const account = this.messenger.call('AccountsController:getAccount', id);
|
|
949
930
|
if (!candidate) {
|
|
950
931
|
candidate = id;
|
|
951
932
|
}
|
|
@@ -969,7 +950,7 @@ _AccountTreeController_accountIdToContext = new WeakMap(), _AccountTreeControlle
|
|
|
969
950
|
candidate = group.id;
|
|
970
951
|
}
|
|
971
952
|
for (const id of group.accounts) {
|
|
972
|
-
const account = this.
|
|
953
|
+
const account = this.messenger.call('AccountsController:getAccount', id);
|
|
973
954
|
if (account && (0, keyring_api_1.isEvmAccountType)(account.type)) {
|
|
974
955
|
// EVM accounts have a higher priority, so if we find any, we just
|
|
975
956
|
// use that group!
|
|
@@ -980,18 +961,18 @@ _AccountTreeController_accountIdToContext = new WeakMap(), _AccountTreeControlle
|
|
|
980
961
|
}
|
|
981
962
|
return candidate;
|
|
982
963
|
}, _AccountTreeController_registerMessageHandlers = function _AccountTreeController_registerMessageHandlers() {
|
|
983
|
-
this.
|
|
984
|
-
this.
|
|
985
|
-
this.
|
|
986
|
-
this.
|
|
987
|
-
this.
|
|
988
|
-
this.
|
|
989
|
-
this.
|
|
964
|
+
this.messenger.registerActionHandler(`${exports.controllerName}:getSelectedAccountGroup`, this.getSelectedAccountGroup.bind(this));
|
|
965
|
+
this.messenger.registerActionHandler(`${exports.controllerName}:setSelectedAccountGroup`, this.setSelectedAccountGroup.bind(this));
|
|
966
|
+
this.messenger.registerActionHandler(`${exports.controllerName}:getAccountsFromSelectedAccountGroup`, this.getAccountsFromSelectedAccountGroup.bind(this));
|
|
967
|
+
this.messenger.registerActionHandler(`${exports.controllerName}:setAccountWalletName`, this.setAccountWalletName.bind(this));
|
|
968
|
+
this.messenger.registerActionHandler(`${exports.controllerName}:setAccountGroupName`, this.setAccountGroupName.bind(this));
|
|
969
|
+
this.messenger.registerActionHandler(`${exports.controllerName}:setAccountGroupPinned`, this.setAccountGroupPinned.bind(this));
|
|
970
|
+
this.messenger.registerActionHandler(`${exports.controllerName}:setAccountGroupHidden`, this.setAccountGroupHidden.bind(this));
|
|
990
971
|
}, _AccountTreeController_createBackupAndSyncContext = function _AccountTreeController_createBackupAndSyncContext() {
|
|
991
972
|
return {
|
|
992
973
|
...__classPrivateFieldGet(this, _AccountTreeController_backupAndSyncConfig, "f"),
|
|
993
974
|
controller: this,
|
|
994
|
-
messenger: this.
|
|
975
|
+
messenger: this.messenger,
|
|
995
976
|
controllerStateUpdateFn: this.update.bind(this),
|
|
996
977
|
traceFn: __classPrivateFieldGet(this, _AccountTreeController_trace, "f").bind(this),
|
|
997
978
|
groupIdToWalletId: __classPrivateFieldGet(this, _AccountTreeController_groupIdToWalletId, "f"),
|