This commit is contained in:
Matthew Fosse 2024-03-25 09:15:59 -07:00
commit 2cd9ba42d2
3 changed files with 3 additions and 7 deletions

View file

@ -276,7 +276,6 @@ class AddressValidator extends TextValidator {
'|([^0-9a-zA-Z]|^)((bc|tb)1q[ac-hj-np-z02-9]{40,80})([^0-9a-zA-Z]|\$)' //P2wshAddress type
'|([^0-9a-zA-Z]|^)((bc|tb)1p([ac-hj-np-z02-9]{39}|[ac-hj-np-z02-9]{59}|[ac-hj-np-z02-9]{8,89}))([^0-9a-zA-Z]|\$)'; //P2trAddress type
case CryptoCurrency.btcln:
// bolt11:
return '(lnbc|LNBC)([0-9]{1,}[a-zA-Z0-9]+)([^0-9a-zA-Z]|\$)';
case CryptoCurrency.ltc:
return '([^0-9a-zA-Z]|^)^L[a-zA-Z0-9]{26,33}([^0-9a-zA-Z]|\$)'

View file

@ -274,9 +274,7 @@ class ExchangeCardState extends State<ExchangeCard> {
color: Theme.of(context)
.extension<ExchangePageTheme>()!
.hintTextColor),
validator: _isAmountEditable
? widget.currencyValueValidator
: null),
validator: _isAmountEditable ? widget.currencyValueValidator : null),
),
),
if (widget.hasAllAmount)
@ -422,8 +420,7 @@ class ExchangeCardState extends State<ExchangeCard> {
arguments: widget.initialCurrency,
);
if (contact is ContactBase &&
contact.address != null) {
if (contact is ContactBase) {
setState(() =>
addressController.text = contact.address);
widget.onPushAddressBookButton?.call(context);

View file

@ -84,7 +84,7 @@ abstract class LightningInvoicePageViewModelBase with Store {
state = FailureState('Amount is too small');
return;
}
if (maximum != null && amountInCrypto > maximum!) {
if (amountInCrypto > 4000000) {
state = FailureState('Amount is too big');
return;
}