diff --git a/packages/mobile/src/components/CurrencyDisplay.tsx b/packages/mobile/src/components/CurrencyDisplay.tsx index 30b6107e05b..03abed729cd 100644 --- a/packages/mobile/src/components/CurrencyDisplay.tsx +++ b/packages/mobile/src/components/CurrencyDisplay.tsx @@ -4,12 +4,14 @@ import BigNumber from 'bignumber.js' import * as React from 'react' import { StyleSheet, Text, View } from 'react-native' import { CURRENCIES, CURRENCY_ENUM } from 'src/geth/consts' +import { LocalCurrencySymbol } from 'src/localCurrency/consts' import { getMoneyDisplayValue } from 'src/utils/formatting' interface Props { amount: BigNumber size: number type: CURRENCY_ENUM + currencySymbol?: LocalCurrencySymbol | null } const symbolRatio = 0.6 @@ -31,10 +33,10 @@ export default class CurrencyDisplay extends React.PureComponent { } render() { - const { size, type, amount } = this.props + const { size, type, amount, currencySymbol: symbol } = this.props const fontSize = size const dollarStyle = { fontSize, lineHeight: Math.round(fontSize * 1.3), color: this.color() } - const currencySymbol = CURRENCIES[type].symbol + const currencySymbol = type === CURRENCY_ENUM.GOLD ? CURRENCIES[type].symbol : symbol return ( diff --git a/packages/mobile/src/components/__snapshots__/AccountOverview.test.tsx.snap b/packages/mobile/src/components/__snapshots__/AccountOverview.test.tsx.snap index d04e4e73564..3ee4068788e 100644 --- a/packages/mobile/src/components/__snapshots__/AccountOverview.test.tsx.snap +++ b/packages/mobile/src/components/__snapshots__/AccountOverview.test.tsx.snap @@ -96,9 +96,7 @@ exports[`renders correctly when Dollar education NUX flow hasn't been completed }, ] } - > - $ - + /> - $ - + /> - $ - + /> - $ - + /> - $ - + /> { const tree = renderer.create( - + + + ) expect(tree).toMatchSnapshot() }) it('renders correctly with giant numbers', () => { const tree = renderer.create( - + + + ) expect(tree).toMatchSnapshot() }) diff --git a/packages/mobile/src/exchange/ExchangeConfirmationCard.tsx b/packages/mobile/src/exchange/ExchangeConfirmationCard.tsx index b345a0d9891..edf6351dc33 100644 --- a/packages/mobile/src/exchange/ExchangeConfirmationCard.tsx +++ b/packages/mobile/src/exchange/ExchangeConfirmationCard.tsx @@ -10,6 +10,7 @@ import ExchangeRate from 'src/exchange/ExchangeRate' import FeeExchangeIcon from 'src/exchange/FeeExchangeIcon' import { CURRENCY_ENUM } from 'src/geth/consts' import { Namespaces } from 'src/i18n' +import { useLocalCurrencySymbol } from 'src/localCurrency/hooks' import FeeIcon from 'src/send/FeeIcon' import RoundedArrow from 'src/shared/RoundedArrow' import { getMoneyDisplayValue } from 'src/utils/formatting' @@ -26,97 +27,109 @@ export interface ExchangeConfirmationCardProps { type Props = ExchangeConfirmationCardProps & WithNamespaces -class ExchangeConfirmationCard extends React.PureComponent { - getTakerToken() { - return this.props.makerToken === CURRENCY_ENUM.DOLLAR - ? CURRENCY_ENUM.GOLD - : CURRENCY_ENUM.DOLLAR - } - - getExchangeRate() { - const { makerAmount, takerAmount, exchangeRate } = this.props +const getTakerToken = (props: Props) => { + return props.makerToken === CURRENCY_ENUM.DOLLAR ? CURRENCY_ENUM.GOLD : CURRENCY_ENUM.DOLLAR +} - if (exchangeRate) { - return exchangeRate - } +const getExchangeRate = (props: Props) => { + const { makerAmount, takerAmount, exchangeRate } = props - // For feed drilldown, the exchange rate has not been provided - return makerAmount.dividedBy(takerAmount) + if (exchangeRate) { + return exchangeRate } - renderNewBalances = (newDollarBalance: BigNumber, newGoldBalance: BigNumber) => { - const { t } = this.props + // For feed drilldown, the exchange rate has not been provided + return makerAmount.dividedBy(takerAmount) +} - return ( - - +const renderNewBalances = ( + props: Props, + newDollarBalance: BigNumber, + newGoldBalance: BigNumber +) => { + const { t } = props - - {t('newBalance')} - - - {t('global:celoDollars')} - - {getMoneyDisplayValue(newDollarBalance, CURRENCY_ENUM.DOLLAR, true)} - - + return ( + + - - {t('global:celoGold')} - - {getMoneyDisplayValue(newGoldBalance, CURRENCY_ENUM.GOLD, true)} - - + + {t('newBalance')} + + + {t('global:celoDollars')} + + {getMoneyDisplayValue(newDollarBalance, CURRENCY_ENUM.DOLLAR, true)} + - ) - } - render() { - const { - t, - newDollarBalance, - newGoldBalance, - makerAmount, - takerAmount, - makerToken: token, - fee, - } = this.props - - return ( - - - - - - - - + + {t('global:celoGold')} + + {getMoneyDisplayValue(newGoldBalance, CURRENCY_ENUM.GOLD, true)} + + + + ) +} - - +export function ExchangeConfirmationCard(props: Props) { + const { + t, + newDollarBalance, + newGoldBalance, + makerAmount, + takerAmount, + makerToken: token, + fee, + } = props + + const localCurrencySymbol = useLocalCurrencySymbol() + + return ( + + + + + + + - - } - /> - } - /> - + + + - {newDollarBalance && - newGoldBalance && - this.renderNewBalances(newDollarBalance, newGoldBalance)} + + } + /> + } + /> - ) - } + + {newDollarBalance && + newGoldBalance && + renderNewBalances(props, newDollarBalance, newGoldBalance)} + + ) } const styles = StyleSheet.create({ diff --git a/packages/mobile/src/home/CeloDollarsOverview.tsx b/packages/mobile/src/home/CeloDollarsOverview.tsx index 5acf7b1ae2a..a50063e3a02 100644 --- a/packages/mobile/src/home/CeloDollarsOverview.tsx +++ b/packages/mobile/src/home/CeloDollarsOverview.tsx @@ -2,12 +2,16 @@ import colors from '@celo/react-components/styles/colors' import fontStyles from '@celo/react-components/styles/fonts' import variables from '@celo/react-components/styles/variables' import * as React from 'react' -import { Trans, withNamespaces, WithNamespaces } from 'react-i18next' +import { withNamespaces, WithNamespaces } from 'react-i18next' import { StyleSheet, Text, View } from 'react-native' import componentWithAnalytics from 'src/analytics/wrapper' import useBalanceAutoRefresh from 'src/home/useBalanceAutoRefresh' import { Namespaces } from 'src/i18n' -import { useDollarsToLocalAmount, useLocalCurrencyCode } from 'src/localCurrency/hooks' +import { + useDollarsToLocalAmount, + useLocalCurrencyCode, + useLocalCurrencySymbol, +} from 'src/localCurrency/hooks' import useSelector from 'src/redux/useSelector' import { getMoneyDisplayValue } from 'src/utils/formatting' @@ -16,25 +20,25 @@ type Props = WithNamespaces function CeloDollarsOverview({ t }: Props) { useBalanceAutoRefresh() const localCurrencyCode = useLocalCurrencyCode() + const localCurrencySymbol = useLocalCurrencySymbol() const dollarBalance = useSelector((state) => state.stableToken.balance) const localBalance = useDollarsToLocalAmount(dollarBalance) const localValue = - localBalance || dollarBalance === null ? getMoneyDisplayValue(localBalance || 0) : '---' + localBalance || dollarBalance === null + ? getMoneyDisplayValue(localBalance || 0) + : getMoneyDisplayValue(dollarBalance || 0) return ( - {t('global:celoDollars')} - - {getMoneyDisplayValue(dollarBalance || 0)} + + {localCurrencySymbol} + {localValue} + {localBalance ? localCurrencyCode : ''} {!!localCurrencyCode && ( - - Equal to{' '} - - {{ localValue }} {{ localCurrencyCode }} - - + {getMoneyDisplayValue(dollarBalance || 0)} + {t('global:celoDollars')} )} @@ -62,6 +66,9 @@ const styles = StyleSheet.create({ fontSize: 18, color: '#B0B5B9', }, + code: { + fontSize: 22, + }, }) export default componentWithAnalytics(withNamespaces(Namespaces.walletFlow5)(CeloDollarsOverview)) diff --git a/packages/mobile/src/home/__snapshots__/CeloDollarsOverview.test.tsx.snap b/packages/mobile/src/home/__snapshots__/CeloDollarsOverview.test.tsx.snap index b305c726686..1c2b1b91783 100644 --- a/packages/mobile/src/home/__snapshots__/CeloDollarsOverview.test.tsx.snap +++ b/packages/mobile/src/home/__snapshots__/CeloDollarsOverview.test.tsx.snap @@ -11,35 +11,42 @@ exports[`CeloDollarsOverview renders correctly 1`] = ` > - global:celoDollars - - + $ + + - 0.00 + "fontFamily": "Hind-SemiBold", + } + } + > + 0.00 + + + + + - Equal to - - + 0.00 - MXN + + + global:celoDollars diff --git a/packages/mobile/src/home/__snapshots__/WalletHome.test.tsx.snap b/packages/mobile/src/home/__snapshots__/WalletHome.test.tsx.snap index c7cb521d5f4..557c78552c3 100644 --- a/packages/mobile/src/home/__snapshots__/WalletHome.test.tsx.snap +++ b/packages/mobile/src/home/__snapshots__/WalletHome.test.tsx.snap @@ -559,35 +559,42 @@ exports[`Testnet banner Shows testnet banner for 5 seconds 1`] = ` > - global:celoDollars - - + $ + + - 0.00 + "fontFamily": "Hind-SemiBold", + } + } + > + 0.00 + + + + + - Equal to - - + 0.00 - MXN + + + global:celoDollars diff --git a/packages/mobile/src/localCurrency/consts.ts b/packages/mobile/src/localCurrency/consts.ts index 20784fcc551..112645e36a1 100644 --- a/packages/mobile/src/localCurrency/consts.ts +++ b/packages/mobile/src/localCurrency/consts.ts @@ -7,4 +7,12 @@ export enum LocalCurrencyCode { PHP = 'PHP', } +export enum LocalCurrencySymbol { + USD = '$', + CAD = '$', + EUR = '€', + MXN = '$', + PHP = '₱', +} + export const LOCAL_CURRENCY_CODES = Object.values(LocalCurrencyCode) diff --git a/packages/mobile/src/localCurrency/hooks.ts b/packages/mobile/src/localCurrency/hooks.ts index b16b95d5803..b27fe70c143 100644 --- a/packages/mobile/src/localCurrency/hooks.ts +++ b/packages/mobile/src/localCurrency/hooks.ts @@ -1,6 +1,10 @@ import BigNumber from 'bignumber.js' import { convertDollarsToLocalAmount } from 'src/localCurrency/convert' -import { getLocalCurrencyCode, getLocalCurrencyExchangeRate } from 'src/localCurrency/selectors' +import { + getLocalCurrencyCode, + getLocalCurrencyExchangeRate, + getLocalCurrencySymbol, +} from 'src/localCurrency/selectors' import useSelector from 'src/redux/useSelector' export function useExchangeRate() { @@ -20,3 +24,7 @@ export function useDollarsToLocalAmount(amount: BigNumber.Value | null) { export function useLocalCurrencyCode() { return useSelector(getLocalCurrencyCode) } + +export function useLocalCurrencySymbol() { + return useSelector(getLocalCurrencySymbol) +} diff --git a/packages/mobile/src/localCurrency/selectors.ts b/packages/mobile/src/localCurrency/selectors.ts index 166db97b105..df4a16d6bb3 100644 --- a/packages/mobile/src/localCurrency/selectors.ts +++ b/packages/mobile/src/localCurrency/selectors.ts @@ -1,5 +1,9 @@ import * as RNLocalize from 'react-native-localize' -import { LOCAL_CURRENCY_CODES, LocalCurrencyCode } from 'src/localCurrency/consts' +import { + LOCAL_CURRENCY_CODES, + LocalCurrencyCode, + LocalCurrencySymbol, +} from 'src/localCurrency/consts' import { RootState } from 'src/redux/reducers' const MIN_UPDATE_INTERVAL = 12 * 3600 * 1000 // 12 hours @@ -31,6 +35,12 @@ export function getLocalCurrencyCode(state: RootState): LocalCurrencyCode | null return currencyCode } +export function getLocalCurrencySymbol(state: RootState): LocalCurrencySymbol | null { + const currencyCode = state.localCurrency.preferredCurrencyCode || DEVICE_BEST_CURRENCY_CODE + + return currencyCode ? LocalCurrencySymbol[currencyCode] : null +} + export function getLocalCurrencyExchangeRate(state: RootState) { const { exchangeRate, fetchedCurrencyCode } = state.localCurrency diff --git a/packages/mobile/src/send/TransferConfirmationCard.tsx b/packages/mobile/src/send/TransferConfirmationCard.tsx index 3a10bce1769..fef1f6f7b85 100644 --- a/packages/mobile/src/send/TransferConfirmationCard.tsx +++ b/packages/mobile/src/send/TransferConfirmationCard.tsx @@ -13,6 +13,11 @@ import { FAQ_LINK } from 'src/config' import { CURRENCY_ENUM } from 'src/geth/consts' import { Namespaces } from 'src/i18n' import { faucetIcon } from 'src/images/Images' +import { + useDollarsToLocalAmount, + useLocalCurrencyCode, + useLocalCurrencySymbol, +} from 'src/localCurrency/hooks' import { Recipient } from 'src/recipients/recipient' import { TransactionTypes } from 'src/transactions/reducer' import { getMoneyDisplayValue, getNetworkFeeDisplayValue } from 'src/utils/formatting' @@ -20,7 +25,7 @@ import { navigateToURI } from 'src/utils/linking' const iconSize = 40 -export interface OwnProps { +export interface TransferConfirmationCardProps { address?: string comment?: string value: BigNumber @@ -31,112 +36,121 @@ export interface OwnProps { recipient?: Recipient } +type Props = TransferConfirmationCardProps & WithNamespaces + // Bordered content placed in a ReviewFrame // Differs from TransferReviewCard which is used during Send flow, this is for completed txs -class TransferConfirmationCard extends React.Component { - onPressGoToFaq = () => { - navigateToURI(FAQ_LINK) - } +const onPressGoToFaq = () => { + navigateToURI(FAQ_LINK) +} - renderTopSection = () => { - const { address, recipient, type, e164PhoneNumber } = this.props - if ( - type === TransactionTypes.VERIFICATION_FEE || - type === TransactionTypes.NETWORK_FEE || - type === TransactionTypes.FAUCET - ) { - return - } else { - return ( - - ) - } +const renderTopSection = (props: Props) => { + const { address, recipient, type, e164PhoneNumber } = props + if ( + type === TransactionTypes.VERIFICATION_FEE || + type === TransactionTypes.NETWORK_FEE || + type === TransactionTypes.FAUCET + ) { + return + } else { + return ( + + ) } +} - renderAmountSection = () => { - const { currency, type, value } = this.props - - switch (type) { - case TransactionTypes.INVITE_SENT: // fallthrough - case TransactionTypes.INVITE_RECEIVED: - return null - case TransactionTypes.NETWORK_FEE: - return ( - - ) - default: - return ( - - ) - } - } +const renderAmountSection = (props: Props) => { + const { currency, type, value } = props - renderBottomSection = () => { - const { t, currency, comment, type, value } = this.props + const localCurrencyCode = useLocalCurrencyCode() + const localCurrencySymbol = useLocalCurrencySymbol() + const transactionValue = getMoneyDisplayValue( + localCurrencyCode ? useDollarsToLocalAmount(value) || 0 : value + ) - if (type === TransactionTypes.VERIFICATION_FEE) { - return {t('receiveFlow8:verificationMessage')} - } else if (type === TransactionTypes.FAUCET) { + switch (type) { + case TransactionTypes.INVITE_SENT: // fallthrough + case TransactionTypes.INVITE_RECEIVED: + return null + case TransactionTypes.NETWORK_FEE: return ( - - {t('receiveFlow8:receivedAmountFromCelo.0')} - {CURRENCIES[currency].symbol} - {getMoneyDisplayValue(this.props.value)} - {t('receiveFlow8:receivedAmountFromCelo.1')} - - ) - } else if (type === TransactionTypes.NETWORK_FEE) { - return ( - - - {t('walletFlow5:networkFeeExplanation.0')} - - {t('walletFlow5:networkFeeExplanation.1')} - - - + ) - } else if (type === TransactionTypes.INVITE_SENT || type === TransactionTypes.INVITE_RECEIVED) { + default: return ( - - - - - {t('inviteFlow11:inviteFee')} - {type === TransactionTypes.INVITE_SENT ? ( - {t('inviteFlow11:whySendFees')} - ) : ( - {t('inviteFlow11:whyReceiveFees')} - )} - - - + ) - } else if (comment) { - // When we want to add more info to the send tx drilldown, that will go here - return {comment} - } } +} + +const renderBottomSection = (props: Props) => { + const { t, currency, comment, type, value } = props - render() { + if (type === TransactionTypes.VERIFICATION_FEE) { + return {t('receiveFlow8:verificationMessage')} + } else if (type === TransactionTypes.FAUCET) { return ( - - {this.renderTopSection()} - {this.renderAmountSection()} - {this.renderBottomSection()} + + {t('receiveFlow8:receivedAmountFromCelo.0')} + {CURRENCIES[currency].symbol} + {getMoneyDisplayValue(props.value)} + {t('receiveFlow8:receivedAmountFromCelo.1')} + + ) + } else if (type === TransactionTypes.NETWORK_FEE) { + return ( + + + {t('walletFlow5:networkFeeExplanation.0')} + + {t('walletFlow5:networkFeeExplanation.1')} + + + + ) + } else if (type === TransactionTypes.INVITE_SENT || type === TransactionTypes.INVITE_RECEIVED) { + return ( + + + + + {t('inviteFlow11:inviteFee')} + {type === TransactionTypes.INVITE_SENT ? ( + {t('inviteFlow11:whySendFees')} + ) : ( + {t('inviteFlow11:whyReceiveFees')} + )} + + ) + } else if (comment) { + // When we want to add more info to the send tx drilldown, that will go here + return {comment} } } +export function TransferConfirmationCard(props: Props) { + return ( + + {renderTopSection(props)} + {renderAmountSection(props)} + {renderBottomSection(props)} + + ) +} + const style = StyleSheet.create({ container: { flex: 1, diff --git a/packages/mobile/src/send/__snapshots__/TransferConfirmationCard.test.tsx.snap b/packages/mobile/src/send/__snapshots__/TransferConfirmationCard.test.tsx.snap index e4e7c430630..36d96a6e22f 100644 --- a/packages/mobile/src/send/__snapshots__/TransferConfirmationCard.test.tsx.snap +++ b/packages/mobile/src/send/__snapshots__/TransferConfirmationCard.test.tsx.snap @@ -79,7 +79,7 @@ exports[`TransferConfirmationCard renders correctly for faucet drilldown 1`] = ` ] } > - 100.00 + 133.00 - 100.00 + 133.00 @@ -491,7 +491,7 @@ exports[`TransferConfirmationCard renders correctly for sent transaction drilldo ] } > - 100.00 + 133.00 - 0.30 + 0.39 { navigateToExchangeReview(timestamp, { @@ -79,10 +85,25 @@ export function ExchangeFeedItem(props: Props) { inCurrency === CURRENCY_ENUM.DOLLAR ? getDollarExchangeProps(props) : getGoldExchangeProps(props) - const { amount, amountDirection, amountColor } = showGoldAmount + const amountProps = showGoldAmount ? getGoldAmountProps(exchangeProps) : getDollarAmountProps(exchangeProps) + const { amountDirection, amountColor } = amountProps + let { amount } = amountProps + + const localCurrencyCode = useLocalCurrencyCode() + const localCurrencySymbol = useLocalCurrencySymbol() + + if (!showGoldAmount) { + amount = !localCurrencyCode ? amount : useDollarsToLocalAmount(amount) || 0 + } + if (inCurrency === CURRENCY_ENUM.DOLLAR) { + inValue = !localCurrencyCode ? inValue : useDollarsToLocalAmount(inValue) || 0 + } else { + outValue = !localCurrencyCode ? outValue : useDollarsToLocalAmount(outValue) || 0 + } + const timeFormatted = formatFeedTime(timestamp, i18n) const dateTimeFormatted = getDatetimeDisplayString(timestamp, t, i18n) const isPending = status === TransactionStatus.Pending @@ -112,7 +133,9 @@ export function ExchangeFeedItem(props: Props) { ]} > {amountDirection} - {getMoneyDisplayValue(amount)} + {showGoldAmount + ? getMoneyDisplayValue(amount) + : localCurrencySymbol + getMoneyDisplayValue(amount) + (localCurrencyCode || '')} diff --git a/packages/mobile/src/transactions/TransferFeedItem.tsx b/packages/mobile/src/transactions/TransferFeedItem.tsx index e348645d403..52d3007ed4c 100644 --- a/packages/mobile/src/transactions/TransferFeedItem.tsx +++ b/packages/mobile/src/transactions/TransferFeedItem.tsx @@ -11,7 +11,11 @@ import { CURRENCIES, CURRENCY_ENUM, resolveCurrency } from 'src/geth/consts' import { Namespaces } from 'src/i18n' import { AddressToE164NumberType } from 'src/identity/reducer' import { Invitees } from 'src/invite/actions' -import { useDollarsToLocalAmount, useLocalCurrencyCode } from 'src/localCurrency/hooks' +import { + useDollarsToLocalAmount, + useLocalCurrencyCode, + useLocalCurrencySymbol, +} from 'src/localCurrency/hooks' import { getRecipientFromAddress, NumberToRecipient } from 'src/recipients/recipient' import { navigateToPaymentTransferReview } from 'src/transactions/actions' import { TransactionStatus, TransactionTypes, TransferStandby } from 'src/transactions/reducer' @@ -136,16 +140,22 @@ export function TransferFeedItem(props: Props) { invitees, addressToE164Number, recipientCache, - showLocalCurrency, } = props const localCurrencyCode = useLocalCurrencyCode() + const localCurrencySymbol = useLocalCurrencySymbol() const localValue = useDollarsToLocalAmount(value) const timeFormatted = formatFeedTime(timestamp, i18n) const dateTimeFormatted = getDatetimeDisplayString(timestamp, t, i18n) const currency = resolveCurrency(symbol) const currencyStyle = getCurrencyStyles(currency, type) const isPending = status === TransactionStatus.Pending + const transactionValue = + type === TransactionTypes.NETWORK_FEE + ? getNetworkFeeDisplayValue(props.value) + : localCurrencyCode + ? getMoneyDisplayValue(localValue || 0) + : getMoneyDisplayValue(props.value) const { title, info, recipient } = getTransferFeedParams( type, @@ -179,9 +189,9 @@ export function TransferFeedItem(props: Props) { ]} > {currencyStyle.direction} - {type === TransactionTypes.NETWORK_FEE - ? getNetworkFeeDisplayValue(props.value) - : getMoneyDisplayValue(props.value)} + {localCurrencySymbol} + {transactionValue} + {localCurrencyCode} {!!info && {info}} @@ -205,16 +215,6 @@ export function TransferFeedItem(props: Props) { {' ' + timeFormatted} )} - {showLocalCurrency && - !!localCurrencyCode && - localValue && ( - - {t('localCurrencyValue', { - localValue: `${currencyStyle.direction}${getMoneyDisplayValue(localValue)}`, - localCurrencyCode, - })} - - )} diff --git a/packages/mobile/src/transactions/__snapshots__/ExchangeFeedItem.test.tsx.snap b/packages/mobile/src/transactions/__snapshots__/ExchangeFeedItem.test.tsx.snap index 9af397a1dff..cf0a5981eee 100644 --- a/packages/mobile/src/transactions/__snapshots__/ExchangeFeedItem.test.tsx.snap +++ b/packages/mobile/src/transactions/__snapshots__/ExchangeFeedItem.test.tsx.snap @@ -123,7 +123,7 @@ exports[`ExchangeFeedItem renders correctly 1`] = ` ] } > - 1.00 + 1.33 - - 100.00 + $ + 133.00 + MXN undefined - - localCurrencyValue - @@ -506,7 +487,7 @@ exports[`renders for gold to dollar exchange properly 1`] = ` } > - - 20.00 + $26.60MXN - 20.00 + 26.60 + $ <0.001 + MXN undefined - - localCurrencyValue - @@ -935,7 +897,7 @@ exports[`renders for gold to dollar exchange properly 1`] = ` } > - - 30.00 + $39.90MXN - 30.00 + 39.90 - - 100.00 + $ + 133.00 + MXN undefined - - localCurrencyValue - @@ -1429,7 +1372,7 @@ exports[`renders for loading 1`] = ` } > - - 20.00 + $26.60MXN - 20.00 + 26.60 + $ <0.001 + MXN undefined - - localCurrencyValue - @@ -1942,7 +1866,9 @@ exports[`renders for no transactions 1`] = ` } > - - 100.00 + $ + 133.00 + MXN undefined - - localCurrencyValue - @@ -2142,7 +2047,7 @@ exports[`renders for no transactions 1`] = ` } > - - 20.00 + $26.60MXN - 20.00 + 26.60 + $ <0.001 + MXN undefined - - localCurrencyValue - @@ -2655,7 +2541,9 @@ exports[`renders for standbyTransactions 1`] = ` } > - - 100.00 + $ + 133.00 + MXN undefined - - localCurrencyValue - @@ -2855,7 +2722,7 @@ exports[`renders for standbyTransactions 1`] = ` } > - - 20.00 + $26.60MXN - 20.00 + 26.60 + $ <0.001 + MXN undefined - - localCurrencyValue - diff --git a/packages/mobile/src/transactions/__snapshots__/TransferFeedItem.test.tsx.snap b/packages/mobile/src/transactions/__snapshots__/TransferFeedItem.test.tsx.snap index c7e8d92a463..8601b725387 100644 --- a/packages/mobile/src/transactions/__snapshots__/TransferFeedItem.test.tsx.snap +++ b/packages/mobile/src/transactions/__snapshots__/TransferFeedItem.test.tsx.snap @@ -95,7 +95,9 @@ exports[`transfer feed item renders correctly for <0.000001 network fee 1`] = ` } > + $ <0.001 + MXN - - localCurrencyValue - - + /> @@ -246,7 +226,9 @@ exports[`transfer feed item renders correctly for faucet 1`] = ` } > - 100.00 + $ + 133.00 + MXN - - localCurrencyValue - - + /> @@ -427,7 +387,9 @@ exports[`transfer feed item renders correctly for known received 1`] = ` } > - 100.00 + $ + 133.00 + MXN - - localCurrencyValue - - + /> @@ -594,7 +534,9 @@ exports[`transfer feed item renders correctly for known sent 1`] = ` } > - - 100.00 + $ + 133.00 + MXN - - localCurrencyValue - - + /> @@ -731,7 +651,9 @@ exports[`transfer feed item renders correctly for network fee 1`] = ` } > + $ 0.002 + MXN - - localCurrencyValue - - + /> @@ -912,7 +812,9 @@ exports[`transfer feed item renders correctly for received 1`] = ` } > - 100.00 + $ + 133.00 + MXN - - localCurrencyValue - - + /> @@ -1049,7 +929,9 @@ exports[`transfer feed item renders correctly for received invite 1`] = ` } > - 1.00 + $ + 1.33 + MXN - - localCurrencyValue - - + /> @@ -1230,7 +1090,9 @@ exports[`transfer feed item renders correctly for received with encrypted commen } > - 100.00 + $ + 133.00 + MXN - - localCurrencyValue - - + /> @@ -1411,7 +1251,9 @@ exports[`transfer feed item renders correctly for sent 1`] = ` } > - - 100.00 + $ + 133.00 + MXN - - localCurrencyValue - - + /> @@ -1548,7 +1368,9 @@ exports[`transfer feed item renders correctly for sent invite 1`] = ` } > - - 1.00 + $ + 1.33 + MXN - - localCurrencyValue - - + /> @@ -1729,7 +1529,9 @@ exports[`transfer feed item renders correctly for sent transaction 1`] = ` } > - - 1.00 + $ + 1.33 + MXN - - localCurrencyValue - - + /> @@ -1910,7 +1690,9 @@ exports[`transfer feed item renders correctly for sent with encrypted comment 1` } > - - 1.00 + $ + 1.33 + MXN - - localCurrencyValue - - + /> @@ -2061,7 +1821,9 @@ exports[`transfer feed item renders correctly for verification fee 1`] = ` } > - - 0.33 + $ + 0.43 + MXN - - localCurrencyValue - - + /> @@ -2231,7 +1971,9 @@ exports[`transfer feed item renders correctly for verification reward 1`] = ` } > - 1.00 + $ + 1.33 + MXN - - localCurrencyValue - - + /> diff --git a/packages/mobile/src/transactions/actions.ts b/packages/mobile/src/transactions/actions.ts index 534fb5bb1ba..6f21490eed3 100644 --- a/packages/mobile/src/transactions/actions.ts +++ b/packages/mobile/src/transactions/actions.ts @@ -3,7 +3,7 @@ import i18n from 'src/i18n' import { navigate } from 'src/navigator/NavigationService' import { Screens } from 'src/navigator/Screens' import { ConfirmationInput as SendConfirmationCardProps } from 'src/send/SendConfirmation' -import { OwnProps as TransferConfirmationCardProps } from 'src/send/TransferConfirmationCard' +import { TransferConfirmationCardProps } from 'src/send/TransferConfirmationCard' import { StandbyTransaction, TransactionTypes } from 'src/transactions/reducer' import { web3 } from 'src/web3/contracts'