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'); state = FailureState('Amount is too small');
return; return;
} }
if (maximum == 0) { if (maximum != null && maximum != 0 && amountInCrypto > maximum!) {
state = FailureState('Your inbound liquidity is 0!');
return;
}
if (maximum != null && amountInCrypto > maximum!) {
state = FailureState('Amount is too big'); state = FailureState('Amount is too big');
return; return;
} }