@metamask-previews/assets-controller 10.0.1-preview-bbd2df29f → 10.1.0-preview-d52465c2b
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 +8 -2
- package/dist/AssetsController.cjs +7 -0
- package/dist/AssetsController.cjs.map +1 -1
- package/dist/AssetsController.d.cts.map +1 -1
- package/dist/AssetsController.d.mts.map +1 -1
- package/dist/AssetsController.mjs +7 -0
- package/dist/AssetsController.mjs.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [10.1.0]
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
|
|
14
|
+
- Add temporary `tempMigrateAssetsInfoMetadataAssets3346` constructor option that heals `assetsInfo` metadata (and custom-asset tracking) wiped by a prior defect for tokens on niche EVM chains, using legacy `TokensController` state provided by the host ([#9393](https://github.com/MetaMask/core/pull/9393))
|
|
15
|
+
|
|
10
16
|
### Changed
|
|
11
17
|
|
|
12
18
|
- Bump `@metamask/messenger` from `^1.2.0` to `^2.0.0` ([#9392](https://github.com/MetaMask/core/pull/9392))
|
|
@@ -14,7 +20,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
14
20
|
### Fixed
|
|
15
21
|
|
|
16
22
|
- Fetch balances when switching account groups, enabling RPC-only networks, or after a new account is added to the account tree ([#9388](https://github.com/MetaMask/core/pull/9388))
|
|
17
|
-
- Add temporary `tempMigrateAssetsInfoMetadataAssets3346` constructor option that heals `assetsInfo` metadata (and custom-asset tracking) wiped by a prior defect for tokens on niche EVM chains, using legacy `TokensController` state provided by the host ([#9393](https://github.com/MetaMask/core/pull/9393))
|
|
18
23
|
|
|
19
24
|
## [10.0.1]
|
|
20
25
|
|
|
@@ -692,7 +697,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
692
697
|
- Refactor `RpcDataSource` to delegate polling to `BalanceFetcher` and `TokenDetector` services ([#7709](https://github.com/MetaMask/core/pull/7709))
|
|
693
698
|
- Refactor `BalanceFetcher` and `TokenDetector` to extend `StaticIntervalPollingControllerOnly` for independent polling management ([#7709](https://github.com/MetaMask/core/pull/7709))
|
|
694
699
|
|
|
695
|
-
[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/assets-controller@10.0
|
|
700
|
+
[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/assets-controller@10.1.0...HEAD
|
|
701
|
+
[10.1.0]: https://github.com/MetaMask/core/compare/@metamask/assets-controller@10.0.1...@metamask/assets-controller@10.1.0
|
|
696
702
|
[10.0.1]: https://github.com/MetaMask/core/compare/@metamask/assets-controller@10.0.0...@metamask/assets-controller@10.0.1
|
|
697
703
|
[10.0.0]: https://github.com/MetaMask/core/compare/@metamask/assets-controller@9.1.0...@metamask/assets-controller@10.0.0
|
|
698
704
|
[9.1.0]: https://github.com/MetaMask/core/compare/@metamask/assets-controller@9.0.2...@metamask/assets-controller@9.1.0
|
|
@@ -2107,19 +2107,25 @@ async function _AssetsController_executeMiddlewares(sources, request, initialRes
|
|
|
2107
2107
|
// EVENT HANDLERS
|
|
2108
2108
|
// ============================================================================
|
|
2109
2109
|
async function _AssetsController_handleAccountGroupChanged() {
|
|
2110
|
+
const gutoStart = Date.now();
|
|
2111
|
+
console.log('[GUTO PERFORMANCE LOG] AssetsController.#handleAccountGroupChanged START');
|
|
2110
2112
|
const accounts = __classPrivateFieldGet(this, _AssetsController_instances, "m", _AssetsController_getSelectedAccounts).call(this);
|
|
2111
2113
|
log('Account group changed', {
|
|
2112
2114
|
accountCount: accounts.length,
|
|
2113
2115
|
accountIds: accounts.map((a) => a.id),
|
|
2114
2116
|
});
|
|
2115
2117
|
__classPrivateFieldSet(this, _AssetsController_lastKnownAccountIds, new Set(accounts.map((a) => a.id)), "f");
|
|
2118
|
+
const gutoMutexStart = Date.now();
|
|
2116
2119
|
const releaseLock = await __classPrivateFieldGet(this, _AssetsController_accountRefreshMutex, "f").acquire();
|
|
2120
|
+
console.log(`[GUTO PERFORMANCE LOG] AssetsController accountRefreshMutex wait took ${Date.now() - gutoMutexStart}ms`);
|
|
2117
2121
|
try {
|
|
2118
2122
|
if (accounts.length > 0) {
|
|
2123
|
+
const gutoGetAssetsStart = Date.now();
|
|
2119
2124
|
await this.getAssets(accounts, {
|
|
2120
2125
|
chainIds: [...__classPrivateFieldGet(this, _AssetsController_enabledChains, "f")],
|
|
2121
2126
|
forceUpdate: true,
|
|
2122
2127
|
});
|
|
2128
|
+
console.log(`[GUTO PERFORMANCE LOG] AssetsController.getAssets (accounts=${accounts.length}, chains=${__classPrivateFieldGet(this, _AssetsController_enabledChains, "f").size}) took ${Date.now() - gutoGetAssetsStart}ms`);
|
|
2123
2129
|
}
|
|
2124
2130
|
// Subscribe after fetch so WS notifications can recover state
|
|
2125
2131
|
__classPrivateFieldGet(this, _AssetsController_instances, "m", _AssetsController_subscribeAssets).call(this);
|
|
@@ -2129,6 +2135,7 @@ async function _AssetsController_handleAccountGroupChanged() {
|
|
|
2129
2135
|
finally {
|
|
2130
2136
|
releaseLock();
|
|
2131
2137
|
}
|
|
2138
|
+
console.log(`[GUTO PERFORMANCE LOG] AssetsController.#handleAccountGroupChanged END (total) took ${Date.now() - gutoStart}ms`);
|
|
2132
2139
|
}, _AssetsController_handleEnabledNetworksChanged = async function _AssetsController_handleEnabledNetworksChanged(enabledNetworkMap) {
|
|
2133
2140
|
const previousChains = __classPrivateFieldGet(this, _AssetsController_enabledChains, "f");
|
|
2134
2141
|
__classPrivateFieldSet(this, _AssetsController_enabledChains, __classPrivateFieldGet(this, _AssetsController_instances, "m", _AssetsController_extractEnabledChains).call(this, enabledNetworkMap), "f");
|