@metamask-previews/assets-controller 11.2.1-preview-3d3ef9d3a → 11.2.1-preview-e0f702919
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 +5 -0
- package/dist/AssetsController.cjs +188 -130
- 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 +188 -130
- package/dist/AssetsController.mjs.map +1 -1
- package/dist/selectors/balance.cjs +19 -1
- package/dist/selectors/balance.cjs.map +1 -1
- package/dist/selectors/balance.d.cts.map +1 -1
- package/dist/selectors/balance.d.mts.map +1 -1
- package/dist/selectors/balance.mjs +19 -1
- package/dist/selectors/balance.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AssetsController.d.cts","sourceRoot":"","sources":["../src/AssetsController.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,8DAA8D,EAC9D,oDAAoD,EACpD,qCAAqC,EACtC,0CAA0C;AAC3C,OAAO,KAAK,EAAE,0CAA0C,EAAE,sCAAsC;AAChG,OAAO,EAAE,cAAc,EAAE,kCAAkC;AAC3D,OAAO,KAAK,EACV,wBAAwB,EACxB,0BAA0B,EAE3B,kCAAkC;AACnC,OAAO,KAAK,EAAE,gCAAgC,EAAE,oCAAoC;AAEpF,OAAO,KAAK,EAAE,aAAa,
|
|
1
|
+
{"version":3,"file":"AssetsController.d.cts","sourceRoot":"","sources":["../src/AssetsController.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,8DAA8D,EAC9D,oDAAoD,EACpD,qCAAqC,EACtC,0CAA0C;AAC3C,OAAO,KAAK,EAAE,0CAA0C,EAAE,sCAAsC;AAChG,OAAO,EAAE,cAAc,EAAE,kCAAkC;AAC3D,OAAO,KAAK,EACV,wBAAwB,EACxB,0BAA0B,EAE3B,kCAAkC;AACnC,O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AAgB,EAAE,iBAAiB,GAAG,IAAI;IA+F9D;;;;;;OAMG;IACH,oBAAoB,CAAC,QAAQ,EAAE,eAAe,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,IAAI;IAqC5E;;OAEG;IACH,sBAAsB,IAAI,IAAI;IA6uB9B;;;;;;;OAOG;IACH,8BAA8B,CAAC,QAAQ,EAAE,OAAO,GAAG,IAAI;IAgpBvD;;;;;;;;;OASG;IACG,kBAAkB,CACtB,QAAQ,EAAE,YAAY,EACtB,QAAQ,EAAE,MAAM,EAChB,OAAO,CAAC,EAAE,WAAW,GACpB,OAAO,CAAC,IAAI,CAAC;IAgGhB,OAAO,IAAI,IAAI;CA4ChB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AssetsController.d.mts","sourceRoot":"","sources":["../src/AssetsController.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,8DAA8D,EAC9D,oDAAoD,EACpD,qCAAqC,EACtC,0CAA0C;AAC3C,OAAO,KAAK,EAAE,0CAA0C,EAAE,sCAAsC;AAChG,OAAO,EAAE,cAAc,EAAE,kCAAkC;AAC3D,OAAO,KAAK,EACV,wBAAwB,EACxB,0BAA0B,EAE3B,kCAAkC;AACnC,OAAO,KAAK,EAAE,gCAAgC,EAAE,oCAAoC;AAEpF,OAAO,KAAK,EAAE,aAAa,
|
|
1
|
+
{"version":3,"file":"AssetsController.d.mts","sourceRoot":"","sources":["../src/AssetsController.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,8DAA8D,EAC9D,oDAAoD,EACpD,qCAAqC,EACtC,0CAA0C;AAC3C,OAAO,KAAK,EAAE,0CAA0C,EAAE,sCAAsC;AAChG,OAAO,EAAE,cAAc,EAAE,kCAAkC;AAC3D,OAAO,KAAK,EACV,wBAAwB,EACxB,0BAA0B,EAE3B,kCAAkC;AACnC,OAAO,KAAK,EAAE,gCAAgC,EAAE,oCAAoC;AAEpF,OAAO,KAAK,EAAE,aAAa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C,QAAQ,EAAE,eAAe,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,IAAI;IAqC5E;;OAEG;IACH,sBAAsB,IAAI,IAAI;IA6uB9B;;;;;;;OAOG;IACH,8BAA8B,CAAC,QAAQ,EAAE,OAAO,GAAG,IAAI;IAgpBvD;;;;;;;;;OASG;IACG,kBAAkB,CACtB,QAAQ,EAAE,YAAY,EACtB,QAAQ,EAAE,MAAM,EAChB,OAAO,CAAC,EAAE,WAAW,GACpB,OAAO,CAAC,IAAI,CAAC;IAgGhB,OAAO,IAAI,IAAI;CA4ChB"}
|
|
@@ -9,7 +9,7 @@ var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (
|
|
|
9
9
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
10
10
|
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
11
11
|
};
|
|
12
|
-
var _AssetsController_instances, _AssetsController_isEnabled, _AssetsController_isBasicFunctionality, _AssetsController_defaultUpdateInterval, _AssetsController_trace, _AssetsController_captureException, _AssetsController_firstInitFetchReported, _AssetsController_stateSizeReported, _AssetsController_emitTrace, _AssetsController_emitStateSizeTrace, _AssetsController_uiOpen, _AssetsController_keyringUnlocked, _AssetsController_controllerMutex, _AssetsController_accountRefreshMutex, _AssetsController_activeSubscriptions, _AssetsController_enabledChains, _AssetsController_lastKnownAccountIds, _AssetsController_getSelectedAccounts, _AssetsController_backendWebsocketDataSource, _AssetsController_accountsApiDataSource, _AssetsController_snapDataSource, _AssetsController_rpcDataSource, _AssetsController_stakedBalanceDataSource, _AssetsController_allBalanceDataSources_get, _AssetsController_priceDataSource, _AssetsController_detectionMiddleware, _AssetsController_customAssetGraduationMiddleware, _AssetsController_rpcFallbackMiddleware, _AssetsController_tokenDataSource, _AssetsController_unsubscribeBasicFunctionality, _AssetsController_queryApiClient, _AssetsController_onActiveChainsUpdated, _AssetsController_initializeNativeAssetsMap, _AssetsController_initializeState, _AssetsController_extractEnabledChains, _AssetsController_normalizeChainReference, _AssetsController_subscribeToEvents, _AssetsController_onUnapprovedTransactionAdded, _AssetsController_onTransactionConfirmed, _AssetsController_onAccountActivityBalanceUpdated, _AssetsController_updateActive, _AssetsController_handleAccountTreeStateChange, _AssetsController_runAccountTreeRefresh, _AssetsController_runStartupRefresh, _AssetsController_registerActionHandlers, _AssetsController_handleActiveChainsUpdate, _AssetsController_executeMiddlewares, _AssetsController_fetchMissingPricesWithoutCache, _AssetsController_getNativeAssetMap, _AssetsController_isNativeAsset, _AssetsController_getAssetType, _AssetsController_resolveNativeAssetIds, _AssetsController_getNativeAssetIdsForEnabledChains, _AssetsController_getNativeAssetIdsForAccount, _AssetsController_getSlowPipelineChainIds, _AssetsController_ensureNativeBalancesDefaultZero, _AssetsController_ensureDefaultTrackedAssetsSeeded, _AssetsController_updateState, _AssetsController_getAssetsFromState, _AssetsController_getAssetFromState, _AssetsController_shouldHideNativeToken, _AssetsController_tokenStandardToAssetType, _AssetsController_start, _AssetsController_stop, _AssetsController_subscribeAssets, _AssetsController_subscribeAssetsBalance, _AssetsController_subscribeRpcCustomAssetsSupplement, _AssetsController_unsubscribeBySubscriptionKey, _AssetsController_subscribeStakedBalance, _AssetsController_buildChainToAccountsMap, _AssetsController_subscribeDataSource, _AssetsController_unsubscribeDataSource, _AssetsController_buildDataRequest, _AssetsController_getEnabledChainsForAccount, _AssetsController_handleAccountGroupChanged, _AssetsController_handleEnabledNetworksChanged, _AssetsController_handleNetworkAdded, _AssetsController_refreshActiveChainsOnNetworkSwitch, _AssetsController_getSelectedEvmChainIdFromNetworkState, _AssetsController_handleNetworkDidChange, _AssetsController_refreshAssetsAfterNetworkChange, _AssetsController_refreshAssetsAfterNetworkAdded;
|
|
12
|
+
var _AssetsController_instances, _AssetsController_isEnabled, _AssetsController_isBasicFunctionality, _AssetsController_defaultUpdateInterval, _AssetsController_trace, _AssetsController_captureException, _AssetsController_firstInitFetchReported, _AssetsController_stateSizeReported, _AssetsController_emitTrace, _AssetsController_withTrace, _AssetsController_emitStateSizeTrace, _AssetsController_uiOpen, _AssetsController_keyringUnlocked, _AssetsController_controllerMutex, _AssetsController_accountRefreshMutex, _AssetsController_activeSubscriptions, _AssetsController_enabledChains, _AssetsController_lastKnownAccountIds, _AssetsController_getSelectedAccounts, _AssetsController_backendWebsocketDataSource, _AssetsController_accountsApiDataSource, _AssetsController_snapDataSource, _AssetsController_rpcDataSource, _AssetsController_stakedBalanceDataSource, _AssetsController_allBalanceDataSources_get, _AssetsController_priceDataSource, _AssetsController_detectionMiddleware, _AssetsController_customAssetGraduationMiddleware, _AssetsController_rpcFallbackMiddleware, _AssetsController_tokenDataSource, _AssetsController_unsubscribeBasicFunctionality, _AssetsController_queryApiClient, _AssetsController_onActiveChainsUpdated, _AssetsController_initializeNativeAssetsMap, _AssetsController_initializeState, _AssetsController_extractEnabledChains, _AssetsController_normalizeChainReference, _AssetsController_subscribeToEvents, _AssetsController_onUnapprovedTransactionAdded, _AssetsController_onTransactionConfirmed, _AssetsController_onAccountActivityBalanceUpdated, _AssetsController_updateActive, _AssetsController_handleAccountTreeStateChange, _AssetsController_runAccountTreeRefresh, _AssetsController_runStartupRefresh, _AssetsController_registerActionHandlers, _AssetsController_handleActiveChainsUpdate, _AssetsController_executeMiddlewares, _AssetsController_fetchMissingPricesWithoutCache, _AssetsController_getNativeAssetMap, _AssetsController_isNativeAsset, _AssetsController_getAssetType, _AssetsController_resolveNativeAssetIds, _AssetsController_getNativeAssetIdsForEnabledChains, _AssetsController_getNativeAssetIdsForAccount, _AssetsController_getSlowPipelineChainIds, _AssetsController_ensureNativeBalancesDefaultZero, _AssetsController_ensureDefaultTrackedAssetsSeeded, _AssetsController_updateState, _AssetsController_getAssetsFromState, _AssetsController_getAssetFromState, _AssetsController_shouldHideNativeToken, _AssetsController_tokenStandardToAssetType, _AssetsController_start, _AssetsController_stop, _AssetsController_subscribeAssets, _AssetsController_subscribeAssetsBalance, _AssetsController_subscribeRpcCustomAssetsSupplement, _AssetsController_unsubscribeBySubscriptionKey, _AssetsController_subscribeStakedBalance, _AssetsController_buildChainToAccountsMap, _AssetsController_subscribeDataSource, _AssetsController_unsubscribeDataSource, _AssetsController_buildDataRequest, _AssetsController_getEnabledChainsForAccount, _AssetsController_handleAccountGroupChanged, _AssetsController_handleEnabledNetworksChanged, _AssetsController_handleNetworkAdded, _AssetsController_refreshActiveChainsOnNetworkSwitch, _AssetsController_getSelectedEvmChainIdFromNetworkState, _AssetsController_handleNetworkDidChange, _AssetsController_refreshAssetsAfterNetworkChange, _AssetsController_refreshAssetsAfterNetworkAdded;
|
|
13
13
|
import { BaseController } from "@metamask/base-controller";
|
|
14
14
|
import { clientControllerSelectors } from "@metamask/client-controller";
|
|
15
15
|
import { isCaipChainId, isStrictHexString, KnownCaipNamespace, parseCaipAssetType, parseCaipChainId } from "@metamask/utils";
|
|
@@ -67,6 +67,7 @@ const DEFAULT_POLLING_INTERVAL_MS = 30000;
|
|
|
67
67
|
// ============================================================================
|
|
68
68
|
const TRACE_FIRST_INIT_FETCH = 'AssetsControllerFirstInitFetch';
|
|
69
69
|
const TRACE_FULL_FETCH = 'AssetsFullFetch';
|
|
70
|
+
const TRACE_BACKGROUND_FETCH = 'AssetsBackgroundFetch';
|
|
70
71
|
const TRACE_DATA_SOURCE_TIMING = 'AssetsDataSourceTiming';
|
|
71
72
|
const TRACE_DATA_SOURCE_ERROR = 'AssetsDataSourceError';
|
|
72
73
|
const TRACE_UPDATE_PIPELINE = 'AssetsUpdatePipeline';
|
|
@@ -449,94 +450,111 @@ export class AssetsController extends BaseController {
|
|
|
449
450
|
customAssets.push(...accountCustomAssets);
|
|
450
451
|
}
|
|
451
452
|
if (options?.forceUpdate) {
|
|
452
|
-
|
|
453
|
-
const request = __classPrivateFieldGet(this, _AssetsController_instances, "m", _AssetsController_buildDataRequest).call(this, accounts, chainIds, {
|
|
454
|
-
assetTypes,
|
|
455
|
-
dataTypes,
|
|
456
|
-
customAssets: customAssets.length > 0 ? customAssets : undefined,
|
|
457
|
-
forceUpdate: true,
|
|
458
|
-
assetsForPriceUpdate: options?.assetsForPriceUpdate,
|
|
459
|
-
});
|
|
460
|
-
// Fast pipeline: accountsApi + stakedBalance → detection → token + price.
|
|
461
|
-
// Snap and RPC are excluded here due to their latency (snap triggers account
|
|
462
|
-
// creation, RPC is slow on many chains). Results are committed to state
|
|
463
|
-
// immediately so the UI can display balances without waiting for them.
|
|
464
|
-
//
|
|
465
|
-
// Fast/slow pipelines use merge so partial API snapshots cannot wipe
|
|
466
|
-
// tokens missing from the response (e.g. USDC when only native balance
|
|
467
|
-
// is returned). Balances present in the response are still refreshed.
|
|
468
|
-
const fastSources = __classPrivateFieldGet(this, _AssetsController_isBasicFunctionality, "f").call(this)
|
|
469
|
-
? [
|
|
470
|
-
createParallelBalanceMiddleware([
|
|
471
|
-
__classPrivateFieldGet(this, _AssetsController_accountsApiDataSource, "f"),
|
|
472
|
-
__classPrivateFieldGet(this, _AssetsController_stakedBalanceDataSource, "f"),
|
|
473
|
-
]),
|
|
474
|
-
// Graduation must run BEFORE the RPC fallback so it only sees
|
|
475
|
-
// AccountsApi/Websocket balances. RPC intentionally carries
|
|
476
|
-
// custom assets and must never trigger graduation.
|
|
477
|
-
__classPrivateFieldGet(this, _AssetsController_customAssetGraduationMiddleware, "f"),
|
|
478
|
-
__classPrivateFieldGet(this, _AssetsController_rpcFallbackMiddleware, "f"),
|
|
479
|
-
__classPrivateFieldGet(this, _AssetsController_detectionMiddleware, "f"),
|
|
480
|
-
createParallelMiddleware([
|
|
481
|
-
__classPrivateFieldGet(this, _AssetsController_tokenDataSource, "f"),
|
|
482
|
-
__classPrivateFieldGet(this, _AssetsController_priceDataSource, "f"),
|
|
483
|
-
]),
|
|
484
|
-
]
|
|
485
|
-
: [__classPrivateFieldGet(this, _AssetsController_stakedBalanceDataSource, "f"), __classPrivateFieldGet(this, _AssetsController_detectionMiddleware, "f")];
|
|
486
|
-
const { response, durationByDataSource } = await __classPrivateFieldGet(this, _AssetsController_instances, "m", _AssetsController_executeMiddlewares).call(this, fastSources, request);
|
|
487
|
-
await __classPrivateFieldGet(this, _AssetsController_instances, "m", _AssetsController_updateState).call(this, {
|
|
488
|
-
...response,
|
|
489
|
-
updateMode: 'merge',
|
|
490
|
-
replaceCoveredChainBalances: true,
|
|
491
|
-
});
|
|
492
|
-
// Background pipeline: snap and RPC run in parallel after the fast path
|
|
493
|
-
// commits to state. Their balances are merged together before detection.
|
|
494
|
-
// Token + price enrichment matches the pre-split behavior: only when basic
|
|
495
|
-
// functionality is on (RPC-only mode must not call token/price APIs).
|
|
496
|
-
const slowPipelineChainIds = __classPrivateFieldGet(this, _AssetsController_instances, "m", _AssetsController_getSlowPipelineChainIds).call(this, chainIds, response);
|
|
497
|
-
if (slowPipelineChainIds.length > 0) {
|
|
498
|
-
const slowSources = __classPrivateFieldGet(this, _AssetsController_isBasicFunctionality, "f").call(this)
|
|
499
|
-
? [__classPrivateFieldGet(this, _AssetsController_snapDataSource, "f"), __classPrivateFieldGet(this, _AssetsController_rpcDataSource, "f")]
|
|
500
|
-
: [__classPrivateFieldGet(this, _AssetsController_rpcDataSource, "f")];
|
|
501
|
-
const slowRequest = { ...request, chainIds: slowPipelineChainIds };
|
|
502
|
-
__classPrivateFieldGet(this, _AssetsController_instances, "m", _AssetsController_executeMiddlewares).call(this, [
|
|
503
|
-
createParallelBalanceMiddleware(slowSources),
|
|
504
|
-
__classPrivateFieldGet(this, _AssetsController_detectionMiddleware, "f"),
|
|
505
|
-
...(__classPrivateFieldGet(this, _AssetsController_isBasicFunctionality, "f").call(this)
|
|
506
|
-
? [
|
|
507
|
-
createParallelMiddleware([
|
|
508
|
-
__classPrivateFieldGet(this, _AssetsController_tokenDataSource, "f"),
|
|
509
|
-
__classPrivateFieldGet(this, _AssetsController_priceDataSource, "f"),
|
|
510
|
-
]),
|
|
511
|
-
]
|
|
512
|
-
: []),
|
|
513
|
-
], slowRequest)
|
|
514
|
-
.then(({ response: slowResponse }) => __classPrivateFieldGet(this, _AssetsController_instances, "m", _AssetsController_updateState).call(this, { ...slowResponse, updateMode: 'merge' }))
|
|
515
|
-
.catch((error) => log('Background pipeline failed', { error }));
|
|
516
|
-
}
|
|
517
|
-
const durationMs = performance.now() - startTime;
|
|
518
|
-
// Emit trace for every full fetch (Assets Health dashboard)
|
|
519
|
-
__classPrivateFieldGet(this, _AssetsController_instances, "m", _AssetsController_emitTrace).call(this, TRACE_FULL_FETCH, {
|
|
520
|
-
duration_ms: durationMs,
|
|
453
|
+
await __classPrivateFieldGet(this, _AssetsController_instances, "m", _AssetsController_withTrace).call(this, TRACE_FULL_FETCH, {
|
|
521
454
|
chain_count: chainIds.length,
|
|
522
455
|
account_count: accounts.length,
|
|
523
456
|
basic_functionality: __classPrivateFieldGet(this, _AssetsController_isBasicFunctionality, "f").call(this),
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
: 0,
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
457
|
+
}, async (parentContext) => {
|
|
458
|
+
const startTime = performance.now();
|
|
459
|
+
const request = __classPrivateFieldGet(this, _AssetsController_instances, "m", _AssetsController_buildDataRequest).call(this, accounts, chainIds, {
|
|
460
|
+
assetTypes,
|
|
461
|
+
dataTypes,
|
|
462
|
+
customAssets: customAssets.length > 0 ? customAssets : undefined,
|
|
463
|
+
forceUpdate: true,
|
|
464
|
+
assetsForPriceUpdate: options?.assetsForPriceUpdate,
|
|
465
|
+
});
|
|
466
|
+
// Fast pipeline: accountsApi + stakedBalance → detection → token + price.
|
|
467
|
+
// Snap and RPC are excluded here due to their latency (snap triggers account
|
|
468
|
+
// creation, RPC is slow on many chains). Results are committed to state
|
|
469
|
+
// immediately so the UI can display balances without waiting for them.
|
|
470
|
+
//
|
|
471
|
+
// Fast/slow pipelines use merge so partial API snapshots cannot wipe
|
|
472
|
+
// tokens missing from the response (e.g. USDC when only native balance
|
|
473
|
+
// is returned). Balances present in the response are still refreshed.
|
|
474
|
+
const fastSources = __classPrivateFieldGet(this, _AssetsController_isBasicFunctionality, "f").call(this)
|
|
475
|
+
? [
|
|
476
|
+
createParallelBalanceMiddleware([
|
|
477
|
+
__classPrivateFieldGet(this, _AssetsController_accountsApiDataSource, "f"),
|
|
478
|
+
__classPrivateFieldGet(this, _AssetsController_stakedBalanceDataSource, "f"),
|
|
479
|
+
]),
|
|
480
|
+
// Graduation must run BEFORE the RPC fallback so it only sees
|
|
481
|
+
// AccountsApi/Websocket balances. RPC intentionally carries
|
|
482
|
+
// custom assets and must never trigger graduation.
|
|
483
|
+
__classPrivateFieldGet(this, _AssetsController_customAssetGraduationMiddleware, "f"),
|
|
484
|
+
__classPrivateFieldGet(this, _AssetsController_rpcFallbackMiddleware, "f"),
|
|
485
|
+
__classPrivateFieldGet(this, _AssetsController_detectionMiddleware, "f"),
|
|
486
|
+
createParallelMiddleware([
|
|
487
|
+
__classPrivateFieldGet(this, _AssetsController_tokenDataSource, "f"),
|
|
488
|
+
__classPrivateFieldGet(this, _AssetsController_priceDataSource, "f"),
|
|
489
|
+
]),
|
|
490
|
+
]
|
|
491
|
+
: [__classPrivateFieldGet(this, _AssetsController_stakedBalanceDataSource, "f"), __classPrivateFieldGet(this, _AssetsController_detectionMiddleware, "f")];
|
|
492
|
+
const { response, durationByDataSource } = await __classPrivateFieldGet(this, _AssetsController_instances, "m", _AssetsController_executeMiddlewares).call(this, fastSources, request, {}, parentContext);
|
|
493
|
+
await __classPrivateFieldGet(this, _AssetsController_instances, "m", _AssetsController_updateState).call(this, {
|
|
494
|
+
...response,
|
|
495
|
+
updateMode: 'merge',
|
|
496
|
+
replaceCoveredChainBalances: true,
|
|
497
|
+
});
|
|
498
|
+
// Background pipeline: snap and RPC run in parallel after the fast path
|
|
499
|
+
// commits to state. Their balances are merged together before detection.
|
|
500
|
+
// Token + price enrichment matches the pre-split behavior: only when basic
|
|
501
|
+
// functionality is on (RPC-only mode must not call token/price APIs).
|
|
502
|
+
// Own parent span so timings nest instead of becoming extra root traces
|
|
503
|
+
// after the fast-path parent has ended.
|
|
504
|
+
const slowPipelineChainIds = __classPrivateFieldGet(this, _AssetsController_instances, "m", _AssetsController_getSlowPipelineChainIds).call(this, chainIds, response);
|
|
505
|
+
if (slowPipelineChainIds.length > 0) {
|
|
506
|
+
const slowSources = __classPrivateFieldGet(this, _AssetsController_isBasicFunctionality, "f").call(this)
|
|
507
|
+
? [__classPrivateFieldGet(this, _AssetsController_snapDataSource, "f"), __classPrivateFieldGet(this, _AssetsController_rpcDataSource, "f")]
|
|
508
|
+
: [__classPrivateFieldGet(this, _AssetsController_rpcDataSource, "f")];
|
|
509
|
+
const slowRequest = { ...request, chainIds: slowPipelineChainIds };
|
|
510
|
+
__classPrivateFieldGet(this, _AssetsController_instances, "m", _AssetsController_withTrace).call(this, TRACE_BACKGROUND_FETCH, {
|
|
511
|
+
chain_count: slowPipelineChainIds.length,
|
|
512
|
+
account_count: accounts.length,
|
|
513
|
+
}, async (slowParentContext) => {
|
|
514
|
+
const { response: slowResponse } = await __classPrivateFieldGet(this, _AssetsController_instances, "m", _AssetsController_executeMiddlewares).call(this, [
|
|
515
|
+
createParallelBalanceMiddleware(slowSources),
|
|
516
|
+
__classPrivateFieldGet(this, _AssetsController_detectionMiddleware, "f"),
|
|
517
|
+
...(__classPrivateFieldGet(this, _AssetsController_isBasicFunctionality, "f").call(this)
|
|
518
|
+
? [
|
|
519
|
+
createParallelMiddleware([
|
|
520
|
+
__classPrivateFieldGet(this, _AssetsController_tokenDataSource, "f"),
|
|
521
|
+
__classPrivateFieldGet(this, _AssetsController_priceDataSource, "f"),
|
|
522
|
+
]),
|
|
523
|
+
]
|
|
524
|
+
: []),
|
|
525
|
+
], slowRequest, {}, slowParentContext);
|
|
526
|
+
await __classPrivateFieldGet(this, _AssetsController_instances, "m", _AssetsController_updateState).call(this, {
|
|
527
|
+
...slowResponse,
|
|
528
|
+
updateMode: 'merge',
|
|
529
|
+
});
|
|
530
|
+
}).catch((error) => log('Background pipeline failed', { error }));
|
|
531
|
+
}
|
|
532
|
+
const durationMs = performance.now() - startTime;
|
|
533
|
+
// Summary fields for Assets Health (nested under the parent span so
|
|
534
|
+
// they do not create additional root transactions).
|
|
535
|
+
__classPrivateFieldGet(this, _AssetsController_instances, "m", _AssetsController_emitTrace).call(this, TRACE_FULL_FETCH, {
|
|
535
536
|
duration_ms: durationMs,
|
|
536
|
-
|
|
537
|
+
chain_count: chainIds.length,
|
|
538
|
+
account_count: accounts.length,
|
|
539
|
+
basic_functionality: __classPrivateFieldGet(this, _AssetsController_isBasicFunctionality, "f").call(this),
|
|
540
|
+
asset_count: response.assetsBalance
|
|
541
|
+
? Object.values(response.assetsBalance).reduce((sum, acct) => sum + Object.keys(acct).length, 0)
|
|
542
|
+
: 0,
|
|
543
|
+
price_count: response.assetsPrice
|
|
544
|
+
? Object.keys(response.assetsPrice).length
|
|
545
|
+
: 0,
|
|
537
546
|
...durationByDataSource,
|
|
538
|
-
});
|
|
539
|
-
|
|
547
|
+
}, { controller: 'AssetsController' }, parentContext);
|
|
548
|
+
if (!__classPrivateFieldGet(this, _AssetsController_firstInitFetchReported, "f")) {
|
|
549
|
+
__classPrivateFieldGet(this, _AssetsController_instances, "m", _AssetsController_emitTrace).call(this, TRACE_FIRST_INIT_FETCH, {
|
|
550
|
+
duration_ms: durationMs,
|
|
551
|
+
chain_ids: JSON.stringify(chainIds),
|
|
552
|
+
...durationByDataSource,
|
|
553
|
+
}, { controller: 'AssetsController' }, parentContext);
|
|
554
|
+
// Mark after emitting so the first-init span itself is not gated.
|
|
555
|
+
__classPrivateFieldSet(this, _AssetsController_firstInitFetchReported, true, "f");
|
|
556
|
+
}
|
|
557
|
+
});
|
|
540
558
|
}
|
|
541
559
|
const result = __classPrivateFieldGet(this, _AssetsController_instances, "m", _AssetsController_getAssetsFromState).call(this, accounts, chainIds, assetTypes);
|
|
542
560
|
return result;
|
|
@@ -915,57 +933,67 @@ export class AssetsController extends BaseController {
|
|
|
915
933
|
* @param request - Optional original request for context when enriching
|
|
916
934
|
*/
|
|
917
935
|
async handleAssetsUpdate(response, sourceId, request) {
|
|
918
|
-
const updateStart = performance.now();
|
|
919
936
|
log('Assets updated from data source', {
|
|
920
937
|
sourceId,
|
|
921
938
|
hasBalance: Boolean(response.assetsBalance),
|
|
922
939
|
hasPrice: Boolean(response.assetsPrice),
|
|
923
940
|
});
|
|
924
|
-
|
|
925
|
-
accountsWithSupportedChains: [],
|
|
926
|
-
chainIds: [],
|
|
927
|
-
dataTypes: ['balance', 'metadata', 'price'],
|
|
928
|
-
};
|
|
929
|
-
// RPC-only mode (basic functionality off): never run token/price APIs. Strip
|
|
930
|
-
// those data types so downstream middleware cannot treat them as requested.
|
|
931
|
-
const pipelineRequest = __classPrivateFieldGet(this, _AssetsController_isBasicFunctionality, "f").call(this)
|
|
932
|
-
? resolvedRequest
|
|
933
|
-
: {
|
|
934
|
-
...resolvedRequest,
|
|
935
|
-
dataTypes: resolvedRequest.dataTypes.filter((dt) => dt !== 'metadata' && dt !== 'price'),
|
|
936
|
-
};
|
|
937
|
-
// Graduate custom assets only when AccountsAPI / Websocket reports them.
|
|
938
|
-
// RPC already fetches custom assets on purpose, and Snap handles non-EVM
|
|
939
|
-
// chains the rule does not apply to, so skip the middleware for those.
|
|
940
|
-
const shouldGraduateCustomAssets = sourceId === 'AccountsApiDataSource' ||
|
|
941
|
-
sourceId === 'BackendWebsocketDataSource' ||
|
|
942
|
-
sourceId === 'AccountActivityService';
|
|
943
|
-
const enrichmentSources = [
|
|
944
|
-
...(shouldGraduateCustomAssets
|
|
945
|
-
? [__classPrivateFieldGet(this, _AssetsController_customAssetGraduationMiddleware, "f")]
|
|
946
|
-
: []),
|
|
947
|
-
__classPrivateFieldGet(this, _AssetsController_detectionMiddleware, "f"),
|
|
948
|
-
];
|
|
949
|
-
if (__classPrivateFieldGet(this, _AssetsController_isBasicFunctionality, "f").call(this)) {
|
|
950
|
-
enrichmentSources.push(createParallelMiddleware([
|
|
951
|
-
__classPrivateFieldGet(this, _AssetsController_tokenDataSource, "f"),
|
|
952
|
-
__classPrivateFieldGet(this, _AssetsController_priceDataSource, "f"),
|
|
953
|
-
]));
|
|
954
|
-
}
|
|
955
|
-
const { response: enrichedResponse } = await __classPrivateFieldGet(this, _AssetsController_instances, "m", _AssetsController_executeMiddlewares).call(this, enrichmentSources, pipelineRequest, response);
|
|
956
|
-
await __classPrivateFieldGet(this, _AssetsController_instances, "m", _AssetsController_updateState).call(this, {
|
|
957
|
-
...enrichedResponse,
|
|
958
|
-
replaceCoveredChainBalances: response.replaceCoveredChainBalances,
|
|
959
|
-
});
|
|
960
|
-
__classPrivateFieldGet(this, _AssetsController_instances, "m", _AssetsController_emitTrace).call(this, TRACE_UPDATE_PIPELINE, {
|
|
941
|
+
await __classPrivateFieldGet(this, _AssetsController_instances, "m", _AssetsController_withTrace).call(this, TRACE_UPDATE_PIPELINE, {
|
|
961
942
|
source: sourceId,
|
|
962
|
-
duration_ms: performance.now() - updateStart,
|
|
963
943
|
has_balance: Boolean(response.assetsBalance),
|
|
964
944
|
has_price: Boolean(response.assetsPrice),
|
|
965
|
-
has_metadata: Boolean(enrichedResponse.assetsInfo),
|
|
966
945
|
balance_account_count: response.assetsBalance
|
|
967
946
|
? Object.keys(response.assetsBalance).length
|
|
968
947
|
: 0,
|
|
948
|
+
}, async (parentContext) => {
|
|
949
|
+
const updateStart = performance.now();
|
|
950
|
+
const resolvedRequest = request ?? {
|
|
951
|
+
accountsWithSupportedChains: [],
|
|
952
|
+
chainIds: [],
|
|
953
|
+
dataTypes: ['balance', 'metadata', 'price'],
|
|
954
|
+
};
|
|
955
|
+
// RPC-only mode (basic functionality off): never run token/price APIs. Strip
|
|
956
|
+
// those data types so downstream middleware cannot treat them as requested.
|
|
957
|
+
const pipelineRequest = __classPrivateFieldGet(this, _AssetsController_isBasicFunctionality, "f").call(this)
|
|
958
|
+
? resolvedRequest
|
|
959
|
+
: {
|
|
960
|
+
...resolvedRequest,
|
|
961
|
+
dataTypes: resolvedRequest.dataTypes.filter((dt) => dt !== 'metadata' && dt !== 'price'),
|
|
962
|
+
};
|
|
963
|
+
// Graduate custom assets only when AccountsAPI / Websocket reports them.
|
|
964
|
+
// RPC already fetches custom assets on purpose, and Snap handles non-EVM
|
|
965
|
+
// chains the rule does not apply to, so skip the middleware for those.
|
|
966
|
+
const shouldGraduateCustomAssets = sourceId === 'AccountsApiDataSource' ||
|
|
967
|
+
sourceId === 'BackendWebsocketDataSource' ||
|
|
968
|
+
sourceId === 'AccountActivityService';
|
|
969
|
+
const enrichmentSources = [
|
|
970
|
+
...(shouldGraduateCustomAssets
|
|
971
|
+
? [__classPrivateFieldGet(this, _AssetsController_customAssetGraduationMiddleware, "f")]
|
|
972
|
+
: []),
|
|
973
|
+
__classPrivateFieldGet(this, _AssetsController_detectionMiddleware, "f"),
|
|
974
|
+
];
|
|
975
|
+
if (__classPrivateFieldGet(this, _AssetsController_isBasicFunctionality, "f").call(this)) {
|
|
976
|
+
enrichmentSources.push(createParallelMiddleware([
|
|
977
|
+
__classPrivateFieldGet(this, _AssetsController_tokenDataSource, "f"),
|
|
978
|
+
__classPrivateFieldGet(this, _AssetsController_priceDataSource, "f"),
|
|
979
|
+
]));
|
|
980
|
+
}
|
|
981
|
+
const { response: enrichedResponse } = await __classPrivateFieldGet(this, _AssetsController_instances, "m", _AssetsController_executeMiddlewares).call(this, enrichmentSources, pipelineRequest, response, parentContext);
|
|
982
|
+
await __classPrivateFieldGet(this, _AssetsController_instances, "m", _AssetsController_updateState).call(this, {
|
|
983
|
+
...enrichedResponse,
|
|
984
|
+
replaceCoveredChainBalances: response.replaceCoveredChainBalances,
|
|
985
|
+
});
|
|
986
|
+
// Summary fields for Assets Health (nested under the parent span).
|
|
987
|
+
__classPrivateFieldGet(this, _AssetsController_instances, "m", _AssetsController_emitTrace).call(this, TRACE_UPDATE_PIPELINE, {
|
|
988
|
+
source: sourceId,
|
|
989
|
+
duration_ms: performance.now() - updateStart,
|
|
990
|
+
has_balance: Boolean(response.assetsBalance),
|
|
991
|
+
has_price: Boolean(response.assetsPrice),
|
|
992
|
+
has_metadata: Boolean(enrichedResponse.assetsInfo),
|
|
993
|
+
balance_account_count: response.assetsBalance
|
|
994
|
+
? Object.keys(response.assetsBalance).length
|
|
995
|
+
: 0,
|
|
996
|
+
}, { controller: 'AssetsController' }, parentContext);
|
|
969
997
|
});
|
|
970
998
|
}
|
|
971
999
|
// ============================================================================
|
|
@@ -1006,13 +1034,42 @@ export class AssetsController extends BaseController {
|
|
|
1006
1034
|
}
|
|
1007
1035
|
_AssetsController_isEnabled = new WeakMap(), _AssetsController_isBasicFunctionality = new WeakMap(), _AssetsController_defaultUpdateInterval = new WeakMap(), _AssetsController_trace = new WeakMap(), _AssetsController_captureException = new WeakMap(), _AssetsController_firstInitFetchReported = new WeakMap(), _AssetsController_stateSizeReported = new WeakMap(), _AssetsController_uiOpen = new WeakMap(), _AssetsController_keyringUnlocked = new WeakMap(), _AssetsController_controllerMutex = new WeakMap(), _AssetsController_accountRefreshMutex = new WeakMap(), _AssetsController_activeSubscriptions = new WeakMap(), _AssetsController_enabledChains = new WeakMap(), _AssetsController_lastKnownAccountIds = new WeakMap(), _AssetsController_backendWebsocketDataSource = new WeakMap(), _AssetsController_accountsApiDataSource = new WeakMap(), _AssetsController_snapDataSource = new WeakMap(), _AssetsController_rpcDataSource = new WeakMap(), _AssetsController_stakedBalanceDataSource = new WeakMap(), _AssetsController_priceDataSource = new WeakMap(), _AssetsController_detectionMiddleware = new WeakMap(), _AssetsController_customAssetGraduationMiddleware = new WeakMap(), _AssetsController_rpcFallbackMiddleware = new WeakMap(), _AssetsController_tokenDataSource = new WeakMap(), _AssetsController_unsubscribeBasicFunctionality = new WeakMap(), _AssetsController_queryApiClient = new WeakMap(), _AssetsController_onActiveChainsUpdated = new WeakMap(), _AssetsController_instances = new WeakSet(), _AssetsController_emitTrace = function _AssetsController_emitTrace(name, data, tags = {
|
|
1008
1036
|
controller: 'AssetsController',
|
|
1009
|
-
}) {
|
|
1037
|
+
}, parentContext) {
|
|
1010
1038
|
if (!__classPrivateFieldGet(this, _AssetsController_trace, "f")) {
|
|
1011
1039
|
return;
|
|
1012
1040
|
}
|
|
1013
|
-
|
|
1041
|
+
// Cold-start only: skip root spans after the first init fetch. Nested
|
|
1042
|
+
// subspans (parentContext set) and error/state-size traces still allowed.
|
|
1043
|
+
if (__classPrivateFieldGet(this, _AssetsController_firstInitFetchReported, "f") &&
|
|
1044
|
+
parentContext === undefined &&
|
|
1045
|
+
name !== TRACE_SUBSCRIPTION_ERROR &&
|
|
1046
|
+
name !== TRACE_STATE_SIZE) {
|
|
1047
|
+
return;
|
|
1048
|
+
}
|
|
1049
|
+
__classPrivateFieldGet(this, _AssetsController_trace, "f").call(this, { name, data, tags, parentContext }, () => undefined)?.catch(() => {
|
|
1014
1050
|
// Telemetry failure must not break.
|
|
1015
1051
|
});
|
|
1052
|
+
}, _AssetsController_withTrace =
|
|
1053
|
+
/**
|
|
1054
|
+
* Run work inside a parent Sentry span and pass its context so callers can
|
|
1055
|
+
* emit nested subspans via {@link #emitTrace}.
|
|
1056
|
+
*
|
|
1057
|
+
* Only wraps work on cold start (before the first init fetch is reported).
|
|
1058
|
+
* Later calls still run `fn`, but without creating a Sentry parent span.
|
|
1059
|
+
*
|
|
1060
|
+
* @param name - Parent span name.
|
|
1061
|
+
* @param data - Key-value pairs attached as span data.
|
|
1062
|
+
* @param fn - Work to run; receives the parent span context.
|
|
1063
|
+
* @param tags - Key-value pairs used for Sentry filtering.
|
|
1064
|
+
* @returns The result of `fn`.
|
|
1065
|
+
*/
|
|
1066
|
+
async function _AssetsController_withTrace(name, data, fn, tags = {
|
|
1067
|
+
controller: 'AssetsController',
|
|
1068
|
+
}) {
|
|
1069
|
+
if (!__classPrivateFieldGet(this, _AssetsController_trace, "f") || __classPrivateFieldGet(this, _AssetsController_firstInitFetchReported, "f")) {
|
|
1070
|
+
return fn(undefined);
|
|
1071
|
+
}
|
|
1072
|
+
return await __classPrivateFieldGet(this, _AssetsController_trace, "f").call(this, { name, data, tags }, (parentContext) => fn(parentContext));
|
|
1016
1073
|
}, _AssetsController_emitStateSizeTrace = function _AssetsController_emitStateSizeTrace() {
|
|
1017
1074
|
if (!__classPrivateFieldGet(this, _AssetsController_trace, "f") || __classPrivateFieldGet(this, _AssetsController_stateSizeReported, "f")) {
|
|
1018
1075
|
return;
|
|
@@ -1376,9 +1433,10 @@ async function _AssetsController_runStartupRefresh(accounts) {
|
|
|
1376
1433
|
* @param sources - Data sources or middlewares with getName() and assetsMiddleware (executed in order).
|
|
1377
1434
|
* @param request - The data request.
|
|
1378
1435
|
* @param initialResponse - Optional initial response (for enriching existing data).
|
|
1436
|
+
* @param parentContext - Optional parent Sentry span; per-source timings nest under it.
|
|
1379
1437
|
* @returns Response and durationByDataSource (exclusive ms per source name).
|
|
1380
1438
|
*/
|
|
1381
|
-
async function _AssetsController_executeMiddlewares(sources, request, initialResponse = {}) {
|
|
1439
|
+
async function _AssetsController_executeMiddlewares(sources, request, initialResponse = {}, parentContext) {
|
|
1382
1440
|
const names = sources.map((source) => source.getName());
|
|
1383
1441
|
const middlewares = sources.map((source) => source.assetsMiddleware);
|
|
1384
1442
|
const inclusive = [];
|
|
@@ -1422,14 +1480,14 @@ async function _AssetsController_executeMiddlewares(sources, request, initialRes
|
|
|
1422
1480
|
durationByDataSource[key] = ms;
|
|
1423
1481
|
}
|
|
1424
1482
|
}
|
|
1425
|
-
// Emit per-source timing
|
|
1483
|
+
// Emit per-source timing as subspans under the parent fetch/update span
|
|
1426
1484
|
for (const [sourceName, durationMs] of Object.entries(durationByDataSource)) {
|
|
1427
1485
|
__classPrivateFieldGet(this, _AssetsController_instances, "m", _AssetsController_emitTrace).call(this, TRACE_DATA_SOURCE_TIMING, {
|
|
1428
1486
|
source: sourceName,
|
|
1429
1487
|
duration_ms: durationMs,
|
|
1430
1488
|
chain_count: request.chainIds.length,
|
|
1431
1489
|
account_count: request.accountsWithSupportedChains.length,
|
|
1432
|
-
});
|
|
1490
|
+
}, { controller: 'AssetsController' }, parentContext);
|
|
1433
1491
|
}
|
|
1434
1492
|
// Failed middlewares: Issues (optional) + perf/Dashboard spans
|
|
1435
1493
|
if (middlewareErrors.length > 0) {
|
|
@@ -1453,7 +1511,7 @@ async function _AssetsController_executeMiddlewares(sources, request, initialRes
|
|
|
1453
1511
|
controller: 'AssetsController',
|
|
1454
1512
|
severity: 'error',
|
|
1455
1513
|
error_type: assetsError.name,
|
|
1456
|
-
});
|
|
1514
|
+
}, parentContext);
|
|
1457
1515
|
}
|
|
1458
1516
|
return { response: result.response, durationByDataSource };
|
|
1459
1517
|
}, _AssetsController_fetchMissingPricesWithoutCache = function _AssetsController_fetchMissingPricesWithoutCache(accounts, chainIds) {
|