From 92850270068351ff1e5e6ab0aa5ddae6dd177b98 Mon Sep 17 00:00:00 2001 From: julian Date: Wed, 19 Jun 2024 13:54:14 -0600 Subject: [PATCH] fix: provider refresh causing issues --- .../my_stack_view/wallet_view/sub_widgets/desktop_send.dart | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/pages_desktop_specific/my_stack_view/wallet_view/sub_widgets/desktop_send.dart b/lib/pages_desktop_specific/my_stack_view/wallet_view/sub_widgets/desktop_send.dart index aa325a653..d54e262f6 100644 --- a/lib/pages_desktop_specific/my_stack_view/wallet_view/sub_widgets/desktop_send.dart +++ b/lib/pages_desktop_specific/my_stack_view/wallet_view/sub_widgets/desktop_send.dart @@ -882,7 +882,9 @@ class _DesktopSendState extends ConsumerState { _cryptoFocus.addListener(() { if (!_cryptoFocus.hasFocus && !_baseFocus.hasFocus) { if (ref.read(pSendAmount) == null) { - ref.refresh(sendAmountProvider); + if (ref.read(sendAmountProvider) != Amount.zero && mounted) { + ref.read(sendAmountProvider.state).state = Amount.zero; + } } else { ref.read(sendAmountProvider.state).state = ref.read(pSendAmount)!; }