From d4d9667e01efb9fbf8454bdfb47112f45a72293a Mon Sep 17 00:00:00 2001 From: Erdem Yerebasmaz Date: Thu, 10 Aug 2023 09:28:19 +0300 Subject: [PATCH] Correct the condition for payment exceed liquidity error --- lib/bloc/account/account_bloc.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/bloc/account/account_bloc.dart b/lib/bloc/account/account_bloc.dart index 182432df5..9df943ce9 100644 --- a/lib/bloc/account/account_bloc.dart +++ b/lib/bloc/account/account_bloc.dart @@ -234,7 +234,7 @@ class AccountBloc extends Cubit with HydratedMixin { (amount > accState.maxInboundLiquidity && amount <= channelMinimumFee)) { throw PaymentBelowSetupFeesError(channelMinimumFee); } - if (amount > accState.maxInboundLiquidity) { + if (channelMinimumFee == null && amount > accState.maxInboundLiquidity) { throw PaymentExceedLiquidityError(accState.maxInboundLiquidity); } if (amount > accState.maxAllowedToReceive) {