Skip to content

Commit fd5ac6a

Browse files
committed
fix: ts json bundling
1 parent ae0f037 commit fd5ac6a

File tree

3 files changed

+1379
-1267
lines changed

3 files changed

+1379
-1267
lines changed

src/common/utils/tokenList.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import type { Address } from "viem"
2+
import tokenList1 from "../../tokenLists/tokenList_1"
23

34
export type TokenListItem = {
45
addressInfo: Address
@@ -14,12 +15,10 @@ export type TokenListItem = {
1415
}
1516
}
1617

17-
const cache: Record<number, TokenListItem[]> = {}
18+
const cache: Record<number, TokenListItem[]> = {
19+
1: tokenList1 as TokenListItem[],
20+
}
1821

1922
export default function getTokenList(chainId: number): TokenListItem[] {
20-
if (!cache[chainId]) {
21-
cache[chainId] = require(`../../tokenLists/tokenList_${chainId}.json`)
22-
}
23-
2423
return cache[chainId]
2524
}

0 commit comments

Comments
 (0)