diff --git a/frontend/src/custom-hooks/useGetValidatorInfo.ts b/frontend/src/custom-hooks/useGetValidatorInfo.ts index 0887030be..b64948f90 100644 --- a/frontend/src/custom-hooks/useGetValidatorInfo.ts +++ b/frontend/src/custom-hooks/useGetValidatorInfo.ts @@ -4,7 +4,7 @@ import { ValidatorProfileInfo } from '@/types/staking'; import { getValidatorRank } from '@/utils/util'; import { parseBalance } from '@/utils/denom'; import useGetAllChainsInfo from './useGetAllChainsInfo'; -import { OASIS_CONFIG, POLYGON_CONFIG, WITVAL } from '@/utils/constants'; +import { COIN_GECKO_IDS, OASIS_CONFIG, POLYGON_CONFIG, WITVAL } from '@/utils/constants'; const removedChains = ['crescent-1', 'archway-1', 'celestia'] @@ -113,7 +113,8 @@ const useGetValidatorInfo = () => { ); const tokens = totalStaked; const usdPriceInfo: TokenInfo | undefined = - tokensPriceInfo?.[minimalDenom]?.info; + tokensPriceInfo?.[minimalDenom]?.info || + tokensPriceInfo?.[COIN_GECKO_IDS?.[minimalDenom]]?.info; const totalStakedInUSD = usdPriceInfo ? (totalStaked * usdPriceInfo.usd).toString() : '-'; diff --git a/frontend/src/utils/constants.ts b/frontend/src/utils/constants.ts index 9da54dc7b..6027386ed 100644 --- a/frontend/src/utils/constants.ts +++ b/frontend/src/utils/constants.ts @@ -258,3 +258,9 @@ export const OASIS_CONFIG = { operatorAddress: 'oasis1qzc687uuywnel4eqtdn6x3t9hkdvf6sf2gtv4ye9', }, }; + +export const COIN_GECKO_IDS: Record = { + ubld: 'BLD', + umars: 'Mars Protocol', + ucmdx: 'cmdx', +};