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

fix(wallet-mobile): exchange value format #3714

Merged
merged 2 commits into from
Oct 29, 2024
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
@@ -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'
Expand Down Expand Up @@ -57,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}),
)
const orderAmount = atomicBreakdown(quantity, wallet.portfolioPrimaryTokenInfo.decimals).bn.toNumber()
const returnUrl = encodeURIComponent(
linksYoroiModuleMaker('yoroi').exchange.order.showCreateResult({
provider: providerSelected?.id ?? '',
Expand Down
Loading