Skip to content

Commit 7c9c8fc

Browse files
authored
fix: add chain logo back to TransactionReceipt for transparent transfers (#2237)
1 parent 5614eb8 commit 7c9c8fc

File tree

1 file changed

+14
-6
lines changed

1 file changed

+14
-6
lines changed

apps/namadillo/src/atoms/integrations/functions.ts

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ const cosmosisForHousefire = {
9292
// ---- Housefire Chain Registry Section End ----
9393

9494
// Whitelist of supported chains
95-
const SUPPORTED_CHAINS_MAP = new Map<string, ChainRegistryEntry>(
95+
const SUPPORTED_IBC_CHAINS_MAP = new Map<string, ChainRegistryEntry>(
9696
Object.entries({
9797
osmosis: osmosis,
9898
"osmosis-housefire": cosmosisForHousefire,
@@ -105,6 +105,13 @@ const SUPPORTED_CHAINS_MAP = new Map<string, ChainRegistryEntry>(
105105
})
106106
);
107107

108+
const SUPPORTED_NAM_CHAINS_MAP = new Map<string, ChainRegistryEntry>(
109+
Object.entries({
110+
namada: namada,
111+
"namada-housefire": housefire,
112+
})
113+
);
114+
108115
export const SUPPORTED_ASSETS_MAP = new Map<string, string[]>(
109116
Object.entries({
110117
osmosis: ["NAM", "OSMO"],
@@ -166,19 +173,20 @@ export const getChannelFromIbcInfo = (
166173
export const getChainRegistryByChainId = (
167174
chainId: string
168175
): ChainRegistryEntry | undefined => {
169-
return SUPPORTED_CHAINS_MAP.values().find(
170-
(registry) => registry.chain.chain_id === chainId
171-
);
176+
return [
177+
...SUPPORTED_IBC_CHAINS_MAP.values(),
178+
...SUPPORTED_NAM_CHAINS_MAP.values(),
179+
].find((registry) => registry.chain.chain_id === chainId);
172180
};
173181

174182
export const getChainRegistryByChainName = (
175183
chainName: string
176184
): ChainRegistryEntry | undefined => {
177-
return SUPPORTED_CHAINS_MAP.get(chainName);
185+
return SUPPORTED_IBC_CHAINS_MAP.get(chainName);
178186
};
179187

180188
export const getAvailableChains = (): Chain[] => {
181-
return SUPPORTED_CHAINS_MAP.entries()
189+
return SUPPORTED_IBC_CHAINS_MAP.entries()
182190
.filter(([key]) => !key.includes("housefire"))
183191
.map(([_, entry]) => entry.chain)
184192
.toArray();

0 commit comments

Comments
 (0)