What changed, and why it matters
This commit fixes a display bug in the wallet settings screen where the 'restore height' value could fail to appear for certain cryptocurrency wallets. The old code tried to read the height directly, but the new code waits for an asynchronous lookup and updates the text field after the UI frame is ready. There is no indication this is a security issue.
No security action required. Treat as a normal UI bug fix during routine review/QA.
Security signals we found
No security-relevant keywords in commit title or message
No changes to authentication, cryptography, networking, or permissions
Change is purely UI/state-management related
No vendor disclosure of security relevance
Evidence from the diff
In edit_refresh_height_view.dart, the previous synchronous call to wallet.getRefreshFromBlockHeight() was replaced with an async .then() chain that schedules a post-frame callback to set the text controller value only if the widget is still mounted. This is a typical Flutter pattern to avoid setState/build-time side effects and to handle futures that may complete after widget disposal. No security boundary, input validation, cryptographic, or network behavior is changed.
Changed components
lib/pages/settings_views/wallet_settings_view/wallet_settings_wallet_settings/edit_refresh_height_view.dartInspect captured patch +7 / −1
diff --git a/lib/pages/settings_views/wallet_settings_view/wallet_settings_wallet_settings/edit_refresh_height_view.dart b/lib/pages/settings_views/wallet_settings_view/wallet_settings_wallet_settings/edit_refresh_height_view.dart
index b83be7e..05d51ac 100644
--- a/lib/pages/settings_views/wallet_settings_view/wallet_settings_wallet_settings/edit_refresh_height_view.dart
+++ b/lib/pages/settings_views/wallet_settings_view/wallet_settings_wallet_settings/edit_refresh_height_view.dart
@@ -110,7 +110,13 @@ class _EditRefreshHeightViewState extends ConsumerState<EditRefreshHeightView> {
.restoreHeight
.toString();
} else if (wallet is CryptonoteWallet && wallet.wallet != null) {
- _controller.text = wallet.getRefreshFromBlockHeight().toString();
+ wallet.getRefreshFromBlockHeight().then((height) {
+ WidgetsBinding.instance.addPostFrameCallback((_) {
+ if (mounted) {
+ _controller.text = height.toString();
+ }
+ });
+ });
} else {
_controller.text = ref
.read(pWalletInfo(widget.walletId))
Why this scored 19/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.