Updated on 2026-08-14

This commit is contained in:
Tangem 2025-07-07 13:50:30 +05:00
commit 1581d74b08

View file

@ -3,6 +3,8 @@ package com.tangem.features.send.v2.deeplink
import arrow.core.getOrElse import arrow.core.getOrElse
import com.tangem.common.routing.AppRoute import com.tangem.common.routing.AppRoute
import com.tangem.common.routing.AppRouter import com.tangem.common.routing.AppRouter
import com.tangem.core.ui.utils.parseBigDecimal
import com.tangem.core.ui.utils.parseBigDecimalOrNull
import com.tangem.domain.tokens.GetCryptoCurrencyUseCase import com.tangem.domain.tokens.GetCryptoCurrencyUseCase
import com.tangem.domain.wallets.usecase.GetSelectedWalletSyncUseCase import com.tangem.domain.wallets.usecase.GetSelectedWalletSyncUseCase
import com.tangem.features.send.v2.api.deeplink.SellRedirectDeepLinkHandler import com.tangem.features.send.v2.api.deeplink.SellRedirectDeepLinkHandler
@ -53,14 +55,15 @@ internal class DefaultSellRedirectDeepLinkHandler @AssistedInject constructor(
Timber.e("Error on getting cryptoCurrency: $it") Timber.e("Error on getting cryptoCurrency: $it")
return@launch return@launch
} }
// Convert using universal parser to account for regional separators
val amountValue = amount.parseBigDecimalOrNull()?.parseBigDecimal(cryptoCurrency.decimals)
appRouter.push( appRouter.push(
AppRoute.Send( AppRoute.Send(
currency = cryptoCurrency, currency = cryptoCurrency,
userWalletId = userWallet.walletId, userWalletId = userWallet.walletId,
transactionId = transactionId, transactionId = transactionId,
destinationAddress = destinationAddress, destinationAddress = destinationAddress,
amount = amount, amount = amountValue,
tag = memo, tag = memo,
), ),
) )