Updated on 2026-08-14
This commit is contained in:
parent
6fd17ffb31
commit
06fb99fd7d
3 changed files with 28 additions and 13 deletions
|
|
@ -6,6 +6,7 @@ import com.tangem.blockchain.common.WalletManager
|
|||
import com.tangem.common.extensions.isZero
|
||||
import com.tangem.tap.common.CurrencyConverter
|
||||
import com.tangem.tap.common.entities.TapCurrency
|
||||
import com.tangem.tap.common.text.DecimalDigitsInputFilter
|
||||
import com.tangem.tap.domain.TapError
|
||||
import com.tangem.tap.store
|
||||
import org.rekotlin.StateType
|
||||
|
|
@ -143,13 +144,7 @@ data class AmountState(
|
|||
}
|
||||
|
||||
fun restoreDecimalSeparator(value: String): String {
|
||||
if (value.contains(decimalSeparator)) return value
|
||||
|
||||
return if (decimalSeparator == ".") {
|
||||
value.replace(",", decimalSeparator)
|
||||
} else {
|
||||
value.replace(".", decimalSeparator)
|
||||
}
|
||||
return DecimalDigitsInputFilter.setDecimalSeparator(value, decimalSeparator)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -144,7 +144,7 @@ class SendFragment : BaseStoreFragment(R.layout.fragment_send) {
|
|||
}
|
||||
}
|
||||
|
||||
etAmountToSend.keyListener = DigitsKeyListener.getInstance("0123456789$decimalSeparator")
|
||||
etAmountToSend.keyListener = DigitsKeyListener.getInstance("0123456789,.")
|
||||
etAmountToSend.setOnFocusChangeListener { v, hasFocus ->
|
||||
snackbarControlledByChangingFocus = true
|
||||
if (hasFocus) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue