From ad90f46671d8db8738957a5de9b3753ebb9b0e5b Mon Sep 17 00:00:00 2001 From: Gonza Montiel Date: Wed, 26 Jul 2023 15:15:57 +0200 Subject: [PATCH] fix amount formatting --- src/pages/collators/dialogs/ClaimRewardsDialog.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/pages/collators/dialogs/ClaimRewardsDialog.tsx b/src/pages/collators/dialogs/ClaimRewardsDialog.tsx index 9aefe4a7..c6c66fd0 100644 --- a/src/pages/collators/dialogs/ClaimRewardsDialog.tsx +++ b/src/pages/collators/dialogs/ClaimRewardsDialog.tsx @@ -5,7 +5,7 @@ import { useGlobalState } from '../../../GlobalStateProvider'; import { useNodeInfoState } from '../../../NodeInfoProvider'; import SuccessDialogIcon from '../../../assets/dialog-status-success'; import { CloseButton } from '../../../components/CloseButton'; -import { nativeToDecimal, nativeToFormat } from '../../../helpers/parseNumbers'; +import { format, nativeToDecimal } from '../../../helpers/parseNumbers'; import { getErrors } from '../../../helpers/substrate'; import { ParachainStakingInflationInflationInfo, useStakingPallet } from '../../../hooks/staking/staking'; @@ -25,7 +25,7 @@ enum ClaimStep { function ClaimRewardsDialog(props: Props) { const { userRewardsBalance = '0', tokenSymbol, visible, onClose } = props; - + console.log(userRewardsBalance); const { createClaimRewardExtrinsic } = useStakingPallet(); const { api } = useNodeInfoState().state; const { walletAccount } = useGlobalState(); @@ -78,7 +78,7 @@ function ClaimRewardsDialog(props: Props) { return (

Amount

-

{nativeToFormat(amount, tokenSymbol, true)}

+

{format(amount.toNumber(), tokenSymbol)}

); case ClaimStep.Success: