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 ae0f037 commit fd5ac6aCopy full SHA for fd5ac6a
src/common/utils/tokenList.ts
@@ -1,4 +1,5 @@
1
import type { Address } from "viem"
2
+import tokenList1 from "../../tokenLists/tokenList_1"
3
4
export type TokenListItem = {
5
addressInfo: Address
@@ -14,12 +15,10 @@ export type TokenListItem = {
14
15
}
16
17
-const cache: Record<number, TokenListItem[]> = {}
18
+const cache: Record<number, TokenListItem[]> = {
19
+ 1: tokenList1 as TokenListItem[],
20
+}
21
22
export default function getTokenList(chainId: number): TokenListItem[] {
- if (!cache[chainId]) {
- cache[chainId] = require(`../../tokenLists/tokenList_${chainId}.json`)
- }
23
-
24
return cache[chainId]
25
0 commit comments