@@ -35,6 +35,12 @@ import {
3535 queryAssetBalances ,
3636} from "./services" ;
3737
38+ export const mainnetNamDenomOnOsmosis =
39+ "ibc/C7110DEC66869DAE9BE9C3C60F4B5313B16A2204AE020C3B0527DD6B322386A3" ;
40+
41+ export const housefireNamDenomOnOsmosis =
42+ "ibc/48473B990DD70EC30F270727C4FEBA5D49C7D74949498CDE99113B13F9EA5522" ;
43+
3844type IBCTransferAtomParams = {
3945 client : SigningStargateClient ;
4046 tx : TxRaw ;
@@ -84,8 +90,20 @@ export const assetBalanceAtomFamily = atomFamily(
8490 ...queryDependentFn ( async ( ) => {
8591 return await queryAndStoreRpc ( chain ! , async ( rpc : string ) => {
8692 const assetsBalances = await queryAssetBalances ( walletAddress ! , rpc ) ;
93+
94+ // Housefire NAM is still appearing because the function `ibcAddressToDenomTrace`
95+ // calls stargate to get the denom based on the `ibc/...` address, and this is
96+ // returning the NAM, so we can't filter it without a major assets refactoring.
97+ // For now, let's filter it individually while we don't have a good solution
98+ // Some solutions:
99+ // - Check only the registry and ignore dynamic values from stargate
100+ // - Create an allow/blocklist to filter it with more control
101+ const allowedBalances = assetsBalances . filter (
102+ ( i ) => i . denom !== housefireNamDenomOnOsmosis
103+ ) ;
104+
87105 return await mapCoinsToAssets (
88- assetsBalances ,
106+ allowedBalances ,
89107 chain ! . chain_id ,
90108 ibcAddressToDenomTrace ( rpc )
91109 ) ;
0 commit comments