You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Use legacy token list from contract-metadata repo to perform auto-detection if active network is mainnet and token detection is disabled in preferences
@@ -390,11 +418,12 @@ export class TokenDetectionController extends StaticIntervalPollingController<
390
418
}
391
419
392
420
/**
393
-
* Triggers asset ERC20 token auto detection for each contract address in contract metadata on mainnet.
421
+
* For each token in the token list provided by the TokenListController, checks the token's balance for the selected account address on the active network.
422
+
* On mainnet, if token detection is disabled in preferences, ERC20 token auto detection will be triggered for each contract address in the legacy token list from the @metamask/contract-metadata repo.
394
423
*
395
-
* @param options - Options to detect tokens.
424
+
* @param options - Options for token detection.
396
425
* @param options.networkClientId - The ID of the network client to use.
397
-
* @param options.accountAddress - The account address to use.
426
+
* @param options.accountAddress - the selectedAddress against which to detect for token balances.
398
427
*/
399
428
asyncdetectTokens({
400
429
networkClientId,
@@ -403,25 +432,28 @@ export class TokenDetectionController extends StaticIntervalPollingController<
0 commit comments