Skip to content

Commit

Permalink
fix amount formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
gonzamontiel committed Jul 26, 2023
1 parent ce0cab0 commit ad90f46
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/pages/collators/dialogs/ClaimRewardsDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand All @@ -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();
Expand Down Expand Up @@ -78,7 +78,7 @@ function ClaimRewardsDialog(props: Props) {
return (
<div className="rounded-lg bg-base-200 flex flex-col p-8 items-center w-fit center m-auto">
<p className="flex">Amount</p>
<h1 className="flex text-4xl">{nativeToFormat(amount, tokenSymbol, true)}</h1>
<h1 className="flex text-4xl">{format(amount.toNumber(), tokenSymbol)}</h1>
</div>
);
case ClaimStep.Success:
Expand Down

0 comments on commit ad90f46

Please sign in to comment.