mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-10-18 05:51:34 +02:00
CW-243-Better-error-message-for-too-many-decimals (#818)
* update amoung validation * fix decimal validator * minor fix
This commit is contained in:
@@ -240,7 +240,7 @@ class ExchangePage extends BasePage {
|
||||
.bodyText1!
|
||||
.color!,
|
||||
currencyValueValidator: AmountValidator(
|
||||
type: exchangeViewModel.wallet.type),
|
||||
currency: exchangeViewModel.depositCurrency),
|
||||
addressTextFieldValidator: AddressValidator(
|
||||
type: exchangeViewModel.depositCurrency),
|
||||
onPushPasteButton: (context) async {
|
||||
@@ -304,7 +304,7 @@ class ExchangePage extends BasePage {
|
||||
.bodyText1!
|
||||
.decorationColor!,
|
||||
currencyValueValidator: AmountValidator(
|
||||
type: exchangeViewModel.wallet.type),
|
||||
currency: exchangeViewModel.receiveCurrency),
|
||||
addressTextFieldValidator:
|
||||
AddressValidator(
|
||||
type: exchangeViewModel
|
||||
|
||||
@@ -165,7 +165,7 @@ class ExchangeTemplatePage extends BasePage {
|
||||
.bodyText1!
|
||||
.color!,
|
||||
currencyValueValidator: AmountValidator(
|
||||
type: exchangeViewModel.wallet.type),
|
||||
currency: exchangeViewModel.depositCurrency),
|
||||
//addressTextFieldValidator: AddressValidator(
|
||||
// type: exchangeViewModel.depositCurrency),
|
||||
),
|
||||
@@ -206,7 +206,7 @@ class ExchangeTemplatePage extends BasePage {
|
||||
.bodyText1!
|
||||
.decorationColor!,
|
||||
currencyValueValidator: AmountValidator(
|
||||
type: exchangeViewModel.wallet.type),
|
||||
currency: exchangeViewModel.receiveCurrency),
|
||||
//addressTextFieldValidator: AddressValidator(
|
||||
// type: exchangeViewModel.receiveCurrency),
|
||||
)),
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import 'package:cake_wallet/routes.dart';
|
||||
import 'package:cake_wallet/utils/show_bar.dart';
|
||||
import 'package:cw_core/wallet_type.dart';
|
||||
import 'package:device_display_brightness/device_display_brightness.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
@@ -119,7 +120,8 @@ class QRWidget extends StatelessWidget {
|
||||
hintText: S.of(context).receive_amount,
|
||||
textColor: Theme.of(context).accentTextTheme!.headline2!.backgroundColor!,
|
||||
borderColor: Theme.of(context).textTheme!.headline5!.decorationColor!,
|
||||
validator: AmountValidator(type: addressListViewModel.type, isAutovalidate: true),
|
||||
validator: AmountValidator(currency:
|
||||
walletTypeToCryptoCurrency(addressListViewModel.type), isAutovalidate: true),
|
||||
// FIX-ME: Check does it equal to autovalidate: true,
|
||||
autovalidateMode: AutovalidateMode.always,
|
||||
placeholderTextStyle: TextStyle(
|
||||
|
||||
Reference in New Issue
Block a user