diff --git a/src/Pages/Accounts/Components/AccountTables/Components/AccountAssets.tsx b/src/Pages/Accounts/Components/AccountTables/Components/AccountAssets.tsx index a1954e4c..92794ae0 100644 --- a/src/Pages/Accounts/Components/AccountTables/Components/AccountAssets.tsx +++ b/src/Pages/Accounts/Components/AccountTables/Components/AccountAssets.tsx @@ -29,7 +29,9 @@ export const AccountAssets = () => { const tableData = accountAssets.map((a) => ({ ...a, displayDenom: assetMetadata.find((md) => md.base === a.denom)?.display, - exponent: assetMetadata.find((md) => md.base === a.denom)?.denomUnits?.[1].exponent, + exponent: + assetMetadata.find((md) => md.base === a.denom)?.denomUnits?.find((du) => !!du.exponent) + ?.exponent || 0, })); // Table header values in order diff --git a/src/Pages/Assets/Components/AssetsList.js b/src/Pages/Assets/Components/AssetsList.js index f44a92bf..77e1187c 100644 --- a/src/Pages/Assets/Components/AssetsList.js +++ b/src/Pages/Assets/Components/AssetsList.js @@ -14,10 +14,12 @@ const AssetsList = () => { getAssetsList: getTableData, } = useAssets(); - const tableData = assets.map(a => ({ + const tableData = assets.map((a) => ({ ...a, - displayDenom: assetMetadata.find(md => md.base === a.marker)?.display, - exponent: assetMetadata.find(md => md.base === a.marker)?.denomUnits[1].exponent, + displayDenom: assetMetadata.find((md) => md.base === a.marker)?.display, + exponent: + assetMetadata.find((md) => md.base === a.marker)?.denomUnits?.find((du) => !!du.exponent) + ?.exponent || 0, })); useEffect(() => {