bridge_ui: fix receiving tvl for unknown chains

This commit is contained in:
Evan Gray 2022-03-16 19:55:28 -04:00 committed by Evan Gray
parent a5dbbac112
commit bbb9986f05
1 changed files with 2 additions and 1 deletions

View File

@ -51,7 +51,8 @@ const createTVLArray = (notionalTvl: NotionalTvl) => {
for (const [chainId, chainAssets] of Object.entries(notionalTvl.AllTime)) {
if (chainId === "*") continue;
const originChainId = +chainId as ChainId;
const originChain = CHAINS_BY_ID[originChainId].name;
const originChain =
CHAINS_BY_ID[originChainId]?.name || `Unknown [${chainId}]`;
for (const [tokenAddress, lockedAsset] of Object.entries(chainAssets)) {
if (tokenAddress === "*") continue;
tvl.push({