From 8c8faf29e4d553948b39775e489d3326b2a4effc Mon Sep 17 00:00:00 2001
From: dsc <dsc@xmr.pm>
Date: Tue, 7 Jul 2020 16:27:57 +0200
Subject: [PATCH] Support comma seperator for amount field, dynamically change
 to dot. Fixes #2951

---
 pages/Transfer.qml | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/pages/Transfer.qml b/pages/Transfer.qml
index 5b136a63..dc344069 100644
--- a/pages/Transfer.qml
+++ b/pages/Transfer.qml
@@ -296,6 +296,7 @@ Rectangle {
                   inlineButtonText: qsTr("All") + translationManager.emptyString
                   inlineButton.onClicked: amountLine.text = "(all)"
                   onTextChanged: {
+                        amountLine.text = amountLine.text.replace(",", ".");
                         const match = amountLine.text.match(/^0+(\d.*)/);
                         if (match) {
                             const cursorPosition = amountLine.cursorPosition;
@@ -311,7 +312,7 @@ Rectangle {
                   }
 
                   validator: RegExpValidator {
-                      regExp: /^(\d{1,8})?([\.]\d{1,12})?$/
+                      regExp: /^(\d{1,8})?([\.,]\d{1,12})?$/
                   }
               }