From 8aa45324755a8f4d152d90db4061f9ef98d7c1ee Mon Sep 17 00:00:00 2001 From: Javier Bueno Date: Mon, 28 Oct 2024 19:29:42 +0100 Subject: [PATCH] CR: update --- .../CreateExchangeOrderScreen.tsx | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/apps/wallet-mobile/src/features/Exchange/useCases/CreateExchangeOrderScreen/CreateExchangeOrderScreen.tsx b/apps/wallet-mobile/src/features/Exchange/useCases/CreateExchangeOrderScreen/CreateExchangeOrderScreen.tsx index dffb56e547..c3839eff5d 100644 --- a/apps/wallet-mobile/src/features/Exchange/useCases/CreateExchangeOrderScreen/CreateExchangeOrderScreen.tsx +++ b/apps/wallet-mobile/src/features/Exchange/useCases/CreateExchangeOrderScreen/CreateExchangeOrderScreen.tsx @@ -1,4 +1,4 @@ -import {atomicFormatter} from '@yoroi/common' +import {atomicBreakdown} from '@yoroi/common' import {useCreateReferralLink, useExchange, useExchangeProvidersByOrderType} from '@yoroi/exchange' import {linksYoroiModuleMaker} from '@yoroi/links' import {useTheme} from '@yoroi/theme' @@ -12,7 +12,6 @@ import {Icon} from '../../../../components/Icon' import {KeyboardAvoidingView} from '../../../../components/KeyboardAvoidingView/KeyboardAvoidingView' import {useModal} from '../../../../components/Modal/ModalContext' import {banxaTestWallet} from '../../../../kernel/env' -import {decimalDot} from '../../../../kernel/i18n/languages' import {useMetrics} from '../../../../kernel/metrics/metricsManager' import {useWalletNavigation} from '../../../../kernel/navigation' import {delay} from '../../../../yoroi-wallets/utils/timeUtils' @@ -58,9 +57,7 @@ export const CreateExchangeOrderScreen = () => { const {height: deviceHeight} = useWindowDimensions() const quantity = BigInt(amount.value) - const orderAmount = Number( - atomicFormatter({value: quantity, decimalPlaces: wallet.portfolioPrimaryTokenInfo.decimals, format: decimalDot}), - ) + const orderAmount = atomicBreakdown(quantity, wallet.portfolioPrimaryTokenInfo.decimals).bn.toNumber() const returnUrl = encodeURIComponent( linksYoroiModuleMaker('yoroi').exchange.order.showCreateResult({ provider: providerSelected?.id ?? '',