1
mirror of https://github.com/monero-project/monero-gui synced 2024-11-25 10:47:19 +01:00

Merge pull request #3271

78f5360a Transfer: support pasting amount with whitespaces (xiphon)
This commit is contained in:
Alexander Blair 2020-12-28 11:41:38 -08:00
commit ad06fcc79e
No known key found for this signature in database
GPG Key ID: C64552D877C32479

View File

@ -298,7 +298,7 @@ Rectangle {
inlineButtonText: qsTr("All") + translationManager.emptyString
inlineButton.onClicked: amountLine.text = "(all)"
onTextChanged: {
amountLine.text = amountLine.text.replace(",", ".");
amountLine.text = amountLine.text.trim().replace(",", ".");
const match = amountLine.text.match(/^0+(\d.*)/);
if (match) {
const cursorPosition = amountLine.cursorPosition;
@ -314,7 +314,7 @@ Rectangle {
}
validator: RegExpValidator {
regExp: /^(\d{1,8})?([\.,]\d{1,12})?$/
regExp: /^\s*(\d{1,8})?([\.,]\d{1,12})?\s*$/
}
}