Skip to content

Commit 009026d

Browse files
committed
chore: updated the comment
1 parent a42657f commit 009026d

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

packages/assets-controllers/src/TokenDetectionController.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -900,9 +900,9 @@ export class TokenDetectionController extends StaticIntervalPollingController<To
900900
try {
901901
tokenListMap = await this.#tokenListService.fetchTokensByChainId(chainId);
902902
} catch {
903-
// If the token list fetch fails, skip detection rather than throwing.
904-
// This matches the pre-existing behaviour where an empty tokensChainsCache
905-
// from TokenListController would simply produce no detected tokens.
903+
// These methods return void; there is no token array to return.
904+
// Gracefully exit so the caller is unaffected — the next polling cycle
905+
// will retry the fetch.
906906
return;
907907
}
908908
const chainCache = this.#applyMusdDefaultToTokensChainsCache(chainId, {
@@ -1006,9 +1006,9 @@ export class TokenDetectionController extends StaticIntervalPollingController<To
10061006
try {
10071007
tokenListMap = await this.#tokenListService.fetchTokensByChainId(chainId);
10081008
} catch {
1009-
// If the token list fetch fails, skip detection rather than throwing.
1010-
// This matches the pre-existing behaviour where an empty tokensChainsCache
1011-
// from TokenListController would simply produce no detected tokens.
1009+
// These methods return void; there is no token array to return.
1010+
// Gracefully exit so the caller is unaffected — the next polling cycle
1011+
// will retry the fetch.
10121012
return;
10131013
}
10141014
const chainCache = this.#applyMusdDefaultToTokensChainsCache(chainId, {

0 commit comments

Comments
 (0)