CW-243-Better-error-message-for-too-many-decimals (#818)

* update amoung validation

* fix decimal validator

* minor fix
This commit is contained in:
Serhii
2023-03-15 19:22:08 +02:00
committed by GitHub
parent fc2627df38
commit 7dfc5b23bc
29 changed files with 78 additions and 23 deletions
@@ -1,4 +1,5 @@
import 'package:cake_wallet/view_model/send/output.dart';
import 'package:cw_core/wallet_type.dart';
import 'package:mobx/mobx.dart';
import 'package:cake_wallet/entities/template.dart';
import 'package:cake_wallet/store/templates/send_template_store.dart';
@@ -26,7 +27,8 @@ abstract class SendTemplateViewModelBase with Store {
Output output;
Validator get amountValidator => AmountValidator(type: _wallet.type);
Validator get amountValidator =>
AmountValidator(currency: walletTypeToCryptoCurrency(_wallet.type));
Validator get addressValidator => AddressValidator(type: _wallet.currency);
+2 -1
View File
@@ -126,7 +126,8 @@ abstract class SendViewModelBase with Store {
CryptoCurrency get currency => _wallet.currency;
Validator get amountValidator => AmountValidator(type: _wallet.type);
Validator get amountValidator =>
AmountValidator(currency: walletTypeToCryptoCurrency(_wallet.type));
Validator get allAmountValidator => AllAmountValidator();