Updated on 2026-08-14
This commit is contained in:
parent
d0b51e0566
commit
e346c755c6
2 changed files with 6 additions and 7 deletions
|
|
@ -37,10 +37,10 @@ class CardTou {
|
|||
}
|
||||
}
|
||||
|
||||
private fun regionCode(cardId: String): String? = when (cardId.substring(2..3)) {
|
||||
"0" -> "fr"
|
||||
"1" -> "ch"
|
||||
"2" -> "at"
|
||||
private fun regionCode(cardId: String): String? = when (cardId[1]) {
|
||||
'0' -> "fr"
|
||||
'1' -> "ch"
|
||||
'2' -> "at"
|
||||
else -> null
|
||||
}
|
||||
}
|
||||
|
|
@ -1,6 +1,5 @@
|
|||
package com.tangem.tap.features.send.redux.middlewares
|
||||
|
||||
import androidx.core.text.isDigitsOnly
|
||||
import com.tangem.blockchain.common.Wallet
|
||||
import com.tangem.commands.common.network.Result
|
||||
import com.tangem.tap.common.redux.AppState
|
||||
|
|
@ -129,8 +128,8 @@ internal class AddressPayIdMiddleware {
|
|||
|
||||
val failReason = isValidBlockchainAddressAndNotTheSameAsWallet(wallet, supposedAddress)
|
||||
if (failReason == null) {
|
||||
noSchemeAddress.getQueryParameter("amount")?.let {
|
||||
if (it.isDigitsOnly()) dispatch(AmountAction.SetAmount(it.toBigDecimal(), false))
|
||||
noSchemeAddress.getQueryParameter("amount")?.toBigDecimalOrNull()?.let {
|
||||
dispatch(AmountAction.SetAmount(it, false))
|
||||
}
|
||||
dispatch(SetWalletAddress(supposedAddress, isUserInput))
|
||||
dispatch(TransactionExtrasAction.Prepare(wallet.blockchain, address, null))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue