Skip to content

Commit

Permalink
fix: remove assetClient asset check, trust that it is ok:
Browse files Browse the repository at this point in the history
    - this was consuming a significant amount of compute on page changes
  • Loading branch information
dib542 committed Feb 8, 2024
1 parent b926b58 commit fa9db01
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions src/lib/web3/hooks/useDenomClients.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,16 +72,7 @@ function useAssetClientByDenom(
return results.reduce<AssetClientByDenom>((map, [denom, client]) => {
// if resolved then add data
if (denom) {
const chainUtil = client?.getChainUtil(REACT_APP__CHAIN_NAME);
const asset = chainUtil?.getAssetByDenom(denom);
// if the client if found, return that
if (client && asset) {
return map.set(denom, client);
}
// if the client is undefined (pending) or null (not found/correct)
else {
return map.set(denom, client ? null : client);
}
return map.set(denom, client);
}
return map;
}, new Map());
Expand Down

0 comments on commit fa9db01

Please sign in to comment.