Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

On-ramp: Change 0 amount to a pending state in order details #5267

Merged
merged 16 commits into from
Nov 22, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ import useAnalytics from '../hooks/useAnalytics';
import { FiatOrder } from '../../FiatOrders';
import { PROVIDER_LINKS } from '../types';
import Account from './Account';
import { FIAT_ORDER_STATES } from '../../../../constants/on-ramp';

/* eslint-disable-next-line import/no-commonjs, @typescript-eslint/no-var-requires, @typescript-eslint/no-require-imports */
const failedIcon = require('./images/TransactionIcon_Failed.png');
Expand Down Expand Up @@ -278,14 +279,16 @@ const OrderDetails: React.FC<Props> = ({
)}{' '}
{cryptocurrency}
</Text>
{orderData?.fiatCurrency?.decimals !== undefined && currencySymbol ? (
{state !== FIAT_ORDER_STATES.PENDING &&
orderData?.fiatCurrency?.decimals !== undefined &&
currencySymbol ? (
wachunei marked this conversation as resolved.
Show resolved Hide resolved
<Text centered small grey>
{currencySymbol}
{renderFiat(amountOut, currency, orderData.fiatCurrency.decimals)}
</Text>
) : (
<Text centered small>
...
<Text centered small grey>
... {currency}
</Text>
)}
</Group>
Expand Down