Skip to content

fix(wallet): show keys awaiting their old password right after a storage update - #1171

Draft
Claudius-Maginificent wants to merge 1 commit into
v1.0-devfrom
fix/refresh-after-migration-retry
Draft

Claudius-Maginificent wants to merge 1 commit into
v1.0-devfrom
fix/refresh-after-migration-retry

Conversation

@Claudius-Maginificent

Copy link
Copy Markdown
Collaborator

TL;DR

After a failed wallet-storage update is retried successfully, the Wallets screen now shows the "this imported key needs your old password" notice right away, instead of only after Refresh or a restart.

User story

As a wallet user upgrading from an older version, I want the app to tell me straight away which imported keys need their old password after the storage update finishes, so that I can restore them without hunting for a Refresh button.

Scenario

Steps to reproduce

  1. The start-up wallet-storage update fails, for example because of a transient error.
  2. With the Wallets screen open, retry the update until it succeeds.

Actual behavior

The restore notice for imported keys that still need their old password does not appear until the user presses Refresh or restarts the app. The same happens after wiping a devnet.

Expected behavior

The notice appears as soon as the update finishes.

Detailed discussion

  • FinishUnwire (migration retry) and the devnet wipe report CacheUpdated { domain: All }. That reaches screens only through cached_data_changed, which WalletsBalancesScreen did not implement.
  • refactor(app): let each domain decide its reactions to backend results #1157 removed the refresh of the screen in view after a task finished, so nothing else re-ran the scan.
  • While the migration has failed, the backend is not wired, so list_pending_protected_restores returns Err. The screen sets pending_restores_scanned = true with an empty list and never scans again.
  • WalletsBalancesScreen::cached_data_changed now resets pending_restores_scanned for CacheDomain::All on its own network, and the banner re-scans on its next paint. No inputs or pending operations are touched.
  • The stale comment in refresh() is updated.
  • Other screens were checked and need nothing for these tasks:
    • Contracts/Documents re-reads every frame.
    • Tools screens re-read on arrival.
    • DPNS lives inside Masternodes, which already handles All.
    • The identity and token screens already handle All.
  • Found during the 2026-11-10 weekly release review.

Testing

  • ui::wallets::wallets_screen::tests::a_finished_storage_update_offers_keys_awaiting_their_old_password:
    • it runs the real banner scan on an unwired context, wires the backend, seeds a legacy password-protected imported key, and checks that All for another network leaves the list empty and All for its own network surfaces 1 entry;
    • it failed before the fix (left: 0, right: 1).
  • --lib wallets_screen: 40 passed. Clippy is clean.
  • An independent review found nothing.

🤖 Co-authored by Claudius the Magnificent AI Agent

🤖 Generated with Claude Code

…etried storage update

Retrying a failed storage update with Wallets open did not show the
"imported key needs your old password" banner until a manual Refresh
or restart: the page scanned for such keys while the storage was still
unreadable and nothing told it to scan again. The finished update
reports a change of every cached domain, which the page did not
handle. Wallets now re-scans on that report for its own network,
without resetting anything else on the page.

<sub>🤖 Co-authored by [Claudius the Magnificent](https://github.com/lklimek/claudius) AI Agent</sub>

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Nov 10, 2026

Copy link
Copy Markdown
Contributor

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@thepastaclaw

Copy link
Copy Markdown
Collaborator

🕓 Review not started yet because this PR is a draft.

  • Request normal review — click when the PR is ready for review.
  • Request priority review — click to move this review to the front of the queue.

Commit 5a525cc. Normal review starts when eligible; priority review starts as soon as a slot is available.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants