We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 292eb2a commit 5fdd6edCopy full SHA for 5fdd6ed
shared/utils/initCurrencyManager.ts
@@ -67,11 +67,16 @@ const TOKEN_LIST_URL =
67
"https://requestnetwork.github.io/request-token-list/latest.json";
68
69
const fetchTokenList = async () => {
70
- const requestNetworkTokenList = await fetch(TOKEN_LIST_URL).then((res) =>
71
- res.json()
72
- );
+ try {
+ const requestNetworkTokenList = await fetch(TOKEN_LIST_URL).then((res) =>
+ res.json()
73
+ );
74
- return requestNetworkTokenList.tokens;
75
+ return requestNetworkTokenList.tokens;
76
+ } catch (err) {
77
+ console.error("Failed to fetch token list", err);
78
+ return [];
79
+ }
80
};
81
82
export async function initializeCurrencyManager(): Promise<CurrencyManager> {
0 commit comments