Skip to content

Commit

Permalink
fix: get its asset config for get tvl
Browse files Browse the repository at this point in the history
  • Loading branch information
nrsirapop committed Apr 24, 2024
1 parent fb9f896 commit 8e5a3f8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion methods/tvl/getTVL.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ module.exports = async params => {
const { asset, chain, force_update } = { ...params };
let { assets, chains } = { ...params };
assets = toArray(assets || asset);
assets = assets.length === 0 ? _.concat(assetsData, itsAssetsData).map(d => d.id) : await Promise.all(assets.map(d => new Promise(async resolve => resolve((await getAssetData(d, assetsData))?.denom || (await getITSAssetData(d, assetsData))?.id))));
assets = assets.length === 0 ? _.concat(assetsData, itsAssetsData).map(d => d.id) : await Promise.all(assets.map(d => new Promise(async resolve => resolve((await getAssetData(d, assetsData))?.denom || (await getITSAssetData(d, itsAssetsData))?.id))));
chains = toArray(chains || chain);
chains = chains.length === 0 ? getChainsList().filter(d => (d.chain_type === 'cosmos' || gateway_contracts?.[d.id]?.address) && !d.no_tvl).map(d => d.id) : _.uniq(_.concat('axelarnet', toArray(chains.map(d => getChainData(d)?.id))));

Expand Down

0 comments on commit 8e5a3f8

Please sign in to comment.