Skip to content

Commit

Permalink
Merge pull request #19 from axelarnetwork/fix/itsTVL
Browse files Browse the repository at this point in the history
fix: get its asset config for get tvl
  • Loading branch information
pjenviri authored Apr 24, 2024
2 parents fb9f896 + 8e5a3f8 commit cfc8f2b
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 cfc8f2b

Please sign in to comment.