diff --git a/app/src/main/java/cy/agorise/bitsybitshareswallet/fragments/SendTransactionFragment.kt b/app/src/main/java/cy/agorise/bitsybitshareswallet/fragments/SendTransactionFragment.kt index acaf8d9..6214504 100644 --- a/app/src/main/java/cy/agorise/bitsybitshareswallet/fragments/SendTransactionFragment.kt +++ b/app/src/main/java/cy/agorise/bitsybitshareswallet/fragments/SendTransactionFragment.kt @@ -457,7 +457,7 @@ class SendTransactionFragment : ConnectedFragment(), ZXingScannerView.ResultHand } private fun validateAmount() { - val txtAmount = tietAmount.text.toString() + val txtAmount = tietAmount.text.toString().replace(",", ".") if (mBalancesDetailsAdapter?.isEmpty != false) return val balance = mBalancesDetailsAdapter?.getItem(spAsset.selectedItemPosition) ?: return @@ -543,7 +543,8 @@ class SendTransactionFragment : ConnectedFragment(), ZXingScannerView.ResultHand // Create TransferOperation if (mNetworkService?.isConnected == true) { val balance = mBalancesDetailsAdapter!!.getItem(spAsset.selectedItemPosition)!! - val amount = (tietAmount.text.toString().toDouble() * Math.pow(10.0, balance.precision.toDouble())).toLong() + val amount = (tietAmount.text.toString().replace(",", ".").toDouble() + * Math.pow(10.0, balance.precision.toDouble())).toLong() val transferAmount = AssetAmount(UnsignedLong.valueOf(amount), Asset(balance.id)) diff --git a/app/src/main/res/layout/fragment_send_transaction.xml b/app/src/main/res/layout/fragment_send_transaction.xml index ece7a05..dc03729 100644 --- a/app/src/main/res/layout/fragment_send_transaction.xml +++ b/app/src/main/res/layout/fragment_send_transaction.xml @@ -70,6 +70,7 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:maxLines="1" + android:digits="0123456789.," android:inputType="numberDecimal"/>