diff --git a/lib/routes/home/widgets/bottom_actions_bar/enter_payment_info_page.dart b/lib/routes/home/widgets/bottom_actions_bar/enter_payment_info_page.dart index d75c980a..813c367b 100644 --- a/lib/routes/home/widgets/bottom_actions_bar/enter_payment_info_page.dart +++ b/lib/routes/home/widgets/bottom_actions_bar/enter_payment_info_page.dart @@ -151,25 +151,23 @@ class _EnterPaymentInfoPageState extends State { Future _onApprovePressed() async { final inputCubit = context.read(); - _setLoading(true); try { + _setLoading(true); await _validateInput(); if (_formKey.currentState!.validate()) { - if (mounted) { - Navigator.of(context).pop(); - } + _setLoading(false); + if (mounted) Navigator.pop(context); inputCubit.addIncomingInput(_paymentInfoController.text, InputSource.inputField); } } catch (error) { + _setLoading(false); _log.warning(error.toString(), error); if (mounted) { setState(() { errorMessage = context.texts().payment_info_dialog_error; }); } - } finally { - _setLoading(false); } }