diff --git a/src/app/components/AmountFormatter/index.tsx b/src/app/components/AmountFormatter/index.tsx index ee6810ef30..242807ed36 100644 --- a/src/app/components/AmountFormatter/index.tsx +++ b/src/app/components/AmountFormatter/index.tsx @@ -14,7 +14,11 @@ interface Props { export const AmountFormatter = memo((props: Props) => { const amount = Number(props.amount) / 10 ** 9 - const amountString = new Intl.NumberFormat('en-US', { minimumFractionDigits: 1 }).format(amount) + const amountString = new Intl.NumberFormat('en-US', { + minimumFractionDigits: 1, + maximumFractionDigits: 15, + }).format(amount) + const ticker = useSelector(selectTicker) return ( diff --git a/src/app/components/TransactionModal/index.tsx b/src/app/components/TransactionModal/index.tsx index 87c9775fd0..eb52bbd1fb 100644 --- a/src/app/components/TransactionModal/index.tsx +++ b/src/app/components/TransactionModal/index.tsx @@ -1,4 +1,4 @@ -import { selectChainContext, selectSelectedNetwork } from 'app/state/network/selectors' +import { selectChainContext } from 'app/state/network/selectors' import { transactionActions } from 'app/state/transaction' import { selectTransaction } from 'app/state/transaction/selectors' import { TransactionStep } from 'app/state/transaction/types' @@ -9,6 +9,7 @@ import * as React from 'react' import { useContext } from 'react' import { useTranslation } from 'react-i18next' import { useDispatch, useSelector } from 'react-redux' + import { AmountFormatter } from '../AmountFormatter' import { PrettyAddress } from '../PrettyAddress' @@ -28,7 +29,7 @@ interface Props {} */ export function TransactionModal(props: Props) { const { t } = useTranslation() - const { transaction, step } = useSelector(selectTransaction) + const { preview, step } = useSelector(selectTransaction) const walletAddress = useSelector(selectAddress) const balance = useSelector(selectBalance) const chainContext = useSelector(selectChainContext) @@ -74,87 +75,101 @@ export function TransactionModal(props: Props) { )} - - - {t('transaction.preview.type', 'Type')} : - - Transfer - - {t('transaction.preview.from', 'From')} : - - - - - - - - {t('transaction.preview.to', 'To')} : - - - - - - - - {t('transaction.preview.amount', 'Amount')} : - - - - - - {t('transaction.preview.balance', 'Balance')} : - - - - - - {t('transaction.preview.fee', 'Fee')} : - - Coming soon - - {t('transaction.preview.gas', 'Gas')} : - - Coming soon - - {t('transaction.preview.genesisHash', 'Genesis Hash')} : - - - {chainContext} + + {t('transaction.preview.type', 'Type')} : + + Transfer + + {t('transaction.preview.from', 'From')} : + + + + + + + + {t('transaction.preview.to', 'To')} : + + + + + + + + {t('transaction.preview.amount', 'Amount')} : + + + + + + {t('transaction.preview.balance', 'Balance')} : + + + + + + {t('transaction.preview.fee', 'Fee')} : + + + + + + {t('transaction.preview.gas', 'Gas')} : + + + + + + {t('transaction.preview.genesisHash', 'Genesis Hash')} : + + + {chainContext} + + + )} + {step === TransactionStep.Preview && ( + +