diff --git a/apps/web/public/chains/agr.svg b/apps/web/public/chains/agr.svg new file mode 100644 index 0000000..119059e --- /dev/null +++ b/apps/web/public/chains/agr.svg @@ -0,0 +1,8 @@ + + + + + + \ No newline at end of file diff --git a/apps/web/public/chains/bera.svg b/apps/web/public/chains/bera.svg new file mode 100644 index 0000000..743b5f6 --- /dev/null +++ b/apps/web/public/chains/bera.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/apps/web/public/chains/canto.svg b/apps/web/public/chains/canto.svg new file mode 100644 index 0000000..85caf97 --- /dev/null +++ b/apps/web/public/chains/canto.svg @@ -0,0 +1,49 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/apps/web/public/chains/casper.svg b/apps/web/public/chains/casper.svg new file mode 100644 index 0000000..d2febc8 --- /dev/null +++ b/apps/web/public/chains/casper.svg @@ -0,0 +1,3 @@ + + + diff --git a/apps/web/public/chains/celestia.svg b/apps/web/public/chains/celestia.svg new file mode 100644 index 0000000..362ba91 --- /dev/null +++ b/apps/web/public/chains/celestia.svg @@ -0,0 +1,52 @@ + + + + + + + + + diff --git a/apps/web/public/chains/doge.svg b/apps/web/public/chains/doge.svg new file mode 100644 index 0000000..c22bf09 --- /dev/null +++ b/apps/web/public/chains/doge.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/apps/web/public/chains/elys.svg b/apps/web/public/chains/elys.svg new file mode 100644 index 0000000..946b125 --- /dev/null +++ b/apps/web/public/chains/elys.svg @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/apps/web/public/chains/ethbeacon.svg b/apps/web/public/chains/ethbeacon.svg new file mode 100644 index 0000000..c761cef --- /dev/null +++ b/apps/web/public/chains/ethbeacon.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/apps/web/public/chains/fuelnetwork.svg b/apps/web/public/chains/fuelnetwork.svg new file mode 100644 index 0000000..ddbcdca --- /dev/null +++ b/apps/web/public/chains/fuelnetwork.svg @@ -0,0 +1,3 @@ + + + diff --git a/apps/web/public/chains/injective.svg b/apps/web/public/chains/injective.svg new file mode 100644 index 0000000..9cc8214 --- /dev/null +++ b/apps/web/public/chains/injective.svg @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/apps/web/public/chains/iota.svg b/apps/web/public/chains/iota.svg new file mode 100644 index 0000000..229f8d4 --- /dev/null +++ b/apps/web/public/chains/iota.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/apps/web/public/chains/jun1.svg b/apps/web/public/chains/jun1.svg new file mode 100644 index 0000000..9a3c803 --- /dev/null +++ b/apps/web/public/chains/jun1.svg @@ -0,0 +1,43 @@ + + + + + + + image/svg+xml + + + + + + + + + + + diff --git a/apps/web/public/chains/kakarott.svg b/apps/web/public/chains/kakarott.svg new file mode 100644 index 0000000..cd0e10c --- /dev/null +++ b/apps/web/public/chains/kakarott.svg @@ -0,0 +1,4 @@ + + + + diff --git a/apps/web/public/chains/koii.svg b/apps/web/public/chains/koii.svg new file mode 100644 index 0000000..5de7e1b --- /dev/null +++ b/apps/web/public/chains/koii.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/apps/web/public/chains/ltc.svg b/apps/web/public/chains/ltc.svg new file mode 100644 index 0000000..9afc706 --- /dev/null +++ b/apps/web/public/chains/ltc.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/apps/web/public/chains/mantapacific.svg b/apps/web/public/chains/mantapacific.svg new file mode 100644 index 0000000..43558b1 --- /dev/null +++ b/apps/web/public/chains/mantapacific.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/apps/web/public/chains/mantle.svg b/apps/web/public/chains/mantle.svg new file mode 100644 index 0000000..dbbf58c --- /dev/null +++ b/apps/web/public/chains/mantle.svg @@ -0,0 +1,4 @@ + + + + diff --git a/apps/web/public/chains/namtse.svg b/apps/web/public/chains/namtse.svg new file mode 100644 index 0000000..71c7dc6 --- /dev/null +++ b/apps/web/public/chains/namtse.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/apps/web/public/chains/osmosis.svg b/apps/web/public/chains/osmosis.svg new file mode 100644 index 0000000..395eadd --- /dev/null +++ b/apps/web/public/chains/osmosis.svg @@ -0,0 +1,118 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/apps/web/public/chains/polkadotassethub.svg b/apps/web/public/chains/polkadotassethub.svg new file mode 100644 index 0000000..7751a9c --- /dev/null +++ b/apps/web/public/chains/polkadotassethub.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/apps/web/public/chains/scroll.svg b/apps/web/public/chains/scroll.svg new file mode 100644 index 0000000..5e93c52 --- /dev/null +++ b/apps/web/public/chains/scroll.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/apps/web/public/chains/secret.svg b/apps/web/public/chains/secret.svg new file mode 100644 index 0000000..65ac1e9 --- /dev/null +++ b/apps/web/public/chains/secret.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/apps/web/public/chains/sidet.svg b/apps/web/public/chains/sidet.svg new file mode 100644 index 0000000..f10bd3f --- /dev/null +++ b/apps/web/public/chains/sidet.svg @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/apps/web/public/chains/stride.svg b/apps/web/public/chains/stride.svg new file mode 100644 index 0000000..68d1e18 --- /dev/null +++ b/apps/web/public/chains/stride.svg @@ -0,0 +1,4 @@ + + + + diff --git a/apps/web/public/chains/tezos.svg b/apps/web/public/chains/tezos.svg new file mode 100644 index 0000000..5f9c35b --- /dev/null +++ b/apps/web/public/chains/tezos.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/apps/web/public/chains/ton.svg b/apps/web/public/chains/ton.svg new file mode 100644 index 0000000..df6fe70 --- /dev/null +++ b/apps/web/public/chains/ton.svg @@ -0,0 +1 @@ +TON \ No newline at end of file diff --git a/apps/web/public/chains/worldchain.svg b/apps/web/public/chains/worldchain.svg new file mode 100644 index 0000000..51afe14 --- /dev/null +++ b/apps/web/public/chains/worldchain.svg @@ -0,0 +1,3 @@ + + + diff --git a/apps/web/public/chains/xrp.svg b/apps/web/public/chains/xrp.svg new file mode 100644 index 0000000..250cbfa --- /dev/null +++ b/apps/web/public/chains/xrp.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/apps/web/public/chains/zksync.svg b/apps/web/public/chains/zksync.svg new file mode 100644 index 0000000..8a9b95d --- /dev/null +++ b/apps/web/public/chains/zksync.svg @@ -0,0 +1,4 @@ + + + + diff --git a/apps/web/src/lib/__tests__/chain-icons.test.ts b/apps/web/src/lib/__tests__/chain-icons.test.ts index 234ea16..e8846a9 100644 --- a/apps/web/src/lib/__tests__/chain-icons.test.ts +++ b/apps/web/src/lib/__tests__/chain-icons.test.ts @@ -13,6 +13,25 @@ describe("getChainIcon", () => { expect(getChainIcon("NEWCHAIN")).toBe("/chains/newchain.svg"); }); + it("resolves newly-added chains to their own icon file", () => { + expect(getChainIcon("CELESTIA")).toBe("/chains/celestia.svg"); + expect(getChainIcon("OSMOSIS")).toBe("/chains/osmosis.svg"); + expect(getChainIcon("INJECTIVE")).toBe("/chains/injective.svg"); + expect(getChainIcon("ZKSYNC")).toBe("/chains/zksync.svg"); + expect(getChainIcon("XRP")).toBe("/chains/xrp.svg"); + }); + + it("aliases testnet / variant specIds onto their mainnet icon", () => { + expect(getChainIcon("CELESTIATA")).toBe("/chains/celestia.svg"); + expect(getChainIcon("CELESTIATM")).toBe("/chains/celestia.svg"); + expect(getChainIcon("SUIT")).toBe("/chains/sui.svg"); + expect(getChainIcon("LAV1")).toBe("/chains/lava.svg"); + expect(getChainIcon("MONADT")).toBe("/chains/monad.svg"); + expect(getChainIcon("CARDANOT")).toBe("/chains/cardano.svg"); + expect(getChainIcon("BERAT2")).toBe("/chains/bera.svg"); + expect(getChainIcon("ZKSYNCSP")).toBe("/chains/zksync.svg"); + }); + it("is case-insensitive on input", () => { expect(getChainIcon("FVMT")).toBe("/chains/filecoin.svg"); expect(getChainIcon("fvmt")).toBe("/chains/filecoin.svg"); diff --git a/packages/shared/src/utils/chain-icons.ts b/packages/shared/src/utils/chain-icons.ts index 5bbb53a..02822c5 100644 --- a/packages/shared/src/utils/chain-icons.ts +++ b/packages/shared/src/utils/chain-icons.ts @@ -13,6 +13,7 @@ /** Maps lowercased specId → icon filename (without .svg extension). */ const ALIASES: Record = { + agrt: "agr", alfajores: "celo", apt1: "aptos", arbitrum: "arbitrum-one", @@ -28,14 +29,21 @@ const ALIASES: Record = { bases: "base", bch: "bitcoincash", bcht: "bitcoincash", + berat: "bera", + berat2: "bera", blastsp: "blast", bsc: "bsc", bsct: "bsc", btc: "bitcoin", btct: "bitcoin", + cardanot: "cardano", + caspert: "casper", celestiat: "celestia", + celestiata: "celestia", + celestiatm: "celestia", cosmoshub: "cosmos-hub", cosmoshubt: "cosmos-hub", + doget: "doge", eth1: "ethereum", evmost: "evmos", ftm250: "fantom", @@ -45,25 +53,44 @@ const ALIASES: Record = { hederat: "hedera", hol1: "ethereum", hyperliquidt: "hyperliquid", + injectivet: "injective", + iotat: "iota", + junt1: "jun1", + koiit: "koii", + lav1: "lava", + ltct: "ltc", + mantapacifict: "mantapacific", + monadt: "monad", movementt: "movement", neart: "near", optm: "optimism", optms: "optimism", + osmosist: "osmosis", + polkadotassethubt: "polkadotassethub", polygon: "polygon", polygona: "polygon", + scrolls: "scroll", + secretp: "secret", sep1: "ethereum", solanat: "solana", sonict: "sonic", spark: "fuse", strgz: "stargaze", strgzt: "stargaze", + stridet: "stride", strk: "starknet", strks: "starknet", + suit: "sui", + tezost: "tezos", + tont: "ton", trx: "tron", trxt: "tron", uniont: "union", + worldchains: "worldchain", xlm: "stellar", xlmt: "stellar", + xrpt: "xrp", + zksyncsp: "zksync", }; /** Returns the icon filename (no extension) for a given specId. */