Skip to content

Commit

Permalink
Fix decimal places on staking (#702)
Browse files Browse the repository at this point in the history
  • Loading branch information
rodrigoncalves authored Feb 19, 2025
1 parent c63dfaa commit 71ef7b0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/app/user/Stake/StakingContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ export const StakingProvider: FC<Props> = ({

const stakePreviewFrom = useMemo(
() => ({
amount: Big(stakeData.amount || 0).toFixed(8),
amount: Big(stakeData.amount || 0).toFixedNoTrailing(8),
amountConvertedToCurrency:
'USD ' + formatCurrency(Big(tokenToSend.price || 0).mul(Big(stakeData.amount || 0))),
balance: tokenToSend.balance,
Expand All @@ -135,7 +135,7 @@ export const StakingProvider: FC<Props> = ({

const stakePreviewTo = useMemo(
() => ({
amount: Big(amountDataToReceive.amountToReceive).toFixed(8),
amount: Big(amountDataToReceive.amountToReceive).toFixedNoTrailing(8),
amountConvertedToCurrency: amountDataToReceive.amountToReceiveConvertedToCurrency,
balance: tokenToReceive.balance,
tokenSymbol: tokenToReceive.symbol,
Expand Down

0 comments on commit 71ef7b0

Please sign in to comment.