diff --git a/lib/bloc/chainswap/chainswap_bloc.dart b/lib/bloc/chainswap/chainswap_bloc.dart index f987931e..dedbdac0 100644 --- a/lib/bloc/chainswap/chainswap_bloc.dart +++ b/lib/bloc/chainswap/chainswap_bloc.dart @@ -53,7 +53,7 @@ class ChainSwapBloc extends Cubit { OnchainPaymentLimitsResponse onchainLimits, ) { var limits = outgoing ? onchainLimits.send : onchainLimits.receive; - if ((limits.maxSat != BigInt.zero && amount > limits.maxZeroConfSat) || amount > limits.maxZeroConfSat) { + if (amount > limits.maxSat) { throw PaymentExceededLimitError(limits.maxSat); } if (amount < limits.minSat) { diff --git a/lib/routes/chainswap/receive/receive_chainswap_page.dart b/lib/routes/chainswap/receive/receive_chainswap_page.dart index ba5b046f..47a98450 100644 --- a/lib/routes/chainswap/receive/receive_chainswap_page.dart +++ b/lib/routes/chainswap/receive/receive_chainswap_page.dart @@ -41,16 +41,16 @@ class _ReceiveChainSwapPageState extends State { void initState() { super.initState(); _doneAction = KeyboardDoneAction(focusNodes: [_amountFocusNode]); - _fetchReverseSwapPairInfo(); + _fetchOnchainLimits(); } void didChangeAppLifecycleState(AppLifecycleState state) { if (state == AppLifecycleState.resumed) { - _fetchReverseSwapPairInfo(); + _fetchOnchainLimits(); } } - Future _fetchReverseSwapPairInfo() async { + Future _fetchOnchainLimits() async { final chainSwapBloc = context.read(); setState(() { _onchainPaymentLimitsFuture = chainSwapBloc.fetchOnchainLimits();