@@ -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+
108115export const SUPPORTED_ASSETS_MAP = new Map < string , string [ ] > (
109116 Object . entries ( {
110117 osmosis : [ "NAM" , "OSMO" ] ,
@@ -166,19 +173,20 @@ export const getChannelFromIbcInfo = (
166173export 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
174182export 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
180188export 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