Merge pull request #1467 from Cyrix126/clear_send_form_validity
What changed, and why it matters
This change fixes a UI state bug in the cryptocurrency wallet's send form. When a user clears the send form, the app now also resets whether the entered address is considered valid. Without this fix, the form could incorrectly keep showing an old address as valid after the user cleared it, which might confuse someone into thinking a new or empty address is acceptable. There is no direct evidence in the commit of funds being stolen or a remote attack.
Treat as a routine UX/state-fix commit. Review whether stale validity state could lead to a transaction being constructed with an empty or wrong address elsewhere, but the diff itself does not indicate a severe security vulnerability. No immediate security response is warranted based solely on this commit.
Security signals we found
UI state desynchronization between form field and validity indicator
Potential user confusion from stale valid-address state
No input validation, cryptographic, or network-layer changes
Evidence from the diff
The patch adds a call to _setValidAddressProviders("") inside the _clearSendForm() helper in both the mobile (send_view.dart) and desktop (desktop_send.dart) send views. This ensures that clearing the form resets the address validity state providers, preventing stale valid/invalid state from persisting after the address field is emptied. The diff is small (+2 lines) and only touches UI state management.
Changed components
lib/pages/send_view/send_view.dartlib/pages_desktop_specific/my_stack_view/wallet_view/sub_widgets/desktop_send.dartInspect captured patch +2 / −0
### lib/pages/send_view/send_view.dart
@@ -1218,6 +1218,7 @@ class _SendViewState extends ConsumerState<SendView> {
_address = "";
_addressToggleFlag = false;
_setOpReturnData(null);
+ _setValidAddressProviders("");
setState(() {});
}
### lib/pages_desktop_specific/my_stack_view/wallet_view/sub_widgets/desktop_send.dart
@@ -871,6 +871,7 @@ class _DesktopSendState extends ConsumerState<DesktopSend> {
_addressToggleFlag = false;
_syncFeeAmount(null);
_setOpReturnData(null);
+ _setValidAddressProviders("");
setState(() {});
}
Why this scored 32/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.