CAKE-210 | added possibility to enter comma in amount field (qr_widget.dart); replaced comma by dot in the MoneroURI and BitcoinURI classes (wallet_address_list_view_model.dart)
OleksandrSobol committed
Dec 17, 2020 at 20:14 UTC
c257c60d72f211b20b68b73705b4d1667366c9bc
2 files changed
+3
-3
lib/src/screens/receive/widgets/qr_widget.dart
+1
-1
@@ -67,7 +67,7 @@ class QRWidget extends StatelessWidget {
67
decimal: true),
68
inputFormatters: [
69
BlacklistingTextInputFormatter(
70
- RegExp('[\\-|\\ |\\,]'))
70
+ RegExp('[\\-|\\ ]'))
71
],
72
textAlign: TextAlign.center,
73
hintText: S.of(context).receive_amount,
lib/view_model/wallet_address_list/wallet_address_list_view_model.dart
+2
-2
@@ -31,7 +31,7 @@ class MoneroURI extends PaymentURI {
31
var base = 'monero:' + address;
32
33
if (amount?.isNotEmpty ?? false) {
34
- base += '?tx_amount=$amount';
34
+ base += '?tx_amount=${amount.replaceAll(',', '.')}';
35
}
36
37
return base;
@@ -47,7 +47,7 @@ class BitcoinURI extends PaymentURI {
47
var base = 'bitcoin:' + address;
48
49
if (amount?.isNotEmpty ?? false) {
50
- base += '?amount=$amount';
50
+ base += '?amount=${amount.replaceAll(',', '.')}';
51
}
52
53
return base;