revert and fix

This commit is contained in:
Matthew Fosse 2024-03-21 08:38:39 -07:00
parent 381363c3cc
commit d0c2c2802b

View file

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