Skip to content

Commit

Permalink
Use ccd metadata constant
Browse files Browse the repository at this point in the history
  • Loading branch information
soerenbf committed Oct 22, 2024
1 parent de2b407 commit 4a79c63
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { UseFormReturn, Validate } from 'react-hook-form';
import { useTranslation } from 'react-i18next';
import clsx from 'clsx';
import { CIS2, CcdAmount, ContractAddress } from '@concordium/web-sdk';
import { CCD_METADATA } from '@shared/constants/token-metadata';
import { ensureDefined } from '@shared/utils/basic-helpers';
import SideArrow from '@assets/svgX/side-arrow.svg';
import ConcordiumLogo from '@assets/svgX/concordium-logo.svg';
Expand Down Expand Up @@ -284,7 +285,7 @@ export default function TokenAmountView(props: TokenAmountViewProps) {

const tokenDecimals = useMemo(() => {
if (selectedToken === null) {
return 6;
return CCD_METADATA.decimals;
}
return selectedToken.metadata.decimals ?? 0;
}, [selectedToken]);
Expand Down

0 comments on commit 4a79c63

Please sign in to comment.