Skip to content

Commit ea50018

Browse files
committed
add custom token for swell
1 parent 3f481a8 commit ea50018

File tree

1 file changed

+22
-1
lines changed

1 file changed

+22
-1
lines changed

src/common/utils/tokenList.ts

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import fs from "node:fs"
2-
import type { Address } from "viem"
2+
import { type Address, isAddressEqual } from "viem"
33

44
export type TokenListItem = {
55
addressInfo: Address
@@ -33,6 +33,27 @@ const cache: Record<number, TokenListItem[]> = {}
3333
fs.readFileSync(`${dir}/${file}`).toString(),
3434
) as TokenListItem[]
3535
}
36+
37+
if (
38+
!cache[1923].find((t) =>
39+
isAddressEqual(
40+
t.addressInfo,
41+
"0x9ab96A4668456896d45c301Bc3A15Cee76AA7B8D",
42+
),
43+
)
44+
) {
45+
// TODO add external tokens sources
46+
cache[1923].push({
47+
addressInfo: "0x9ab96A4668456896d45c301Bc3A15Cee76AA7B8D",
48+
chainId: 1923,
49+
name: "rUSDC",
50+
symbol: "rUSDC",
51+
decimals: 6,
52+
logoURI:
53+
"https://assets.coingecko.com/coins/images/55061/standard/rUSDC-_200x200.png?1743524727",
54+
meta: {},
55+
})
56+
}
3657
})()
3758

3859
export default function getTokenList(chainId: number): TokenListItem[] {

0 commit comments

Comments
 (0)