feat(wallet): explain notes + why to consolidate in the large-wallet nudge
The large-wallet notification just said "This wallet file is large" — users who don't know what a shielded "note" is had no idea what to do or why. The nudge now teaches: its message explains that each payment is stored as a separate note, that notes pile up and enlarge/slow the wallet, and that consolidating merges them while leaving the balance unchanged. The text wraps in full in the bell/ alert panel and the Settings wallet-size banner (and shows on hover from the ellipsized toast), and the hover tooltip adds the detail plus points at the new Auto-consolidate toggle. When Auto-consolidate is ON the nudge no longer stays silent — it shows a calm one-time info (wallet_size_auto_info) telling the user the background consolidator is already handling it, so the accumulating notes never look like an unexplained problem. When it's OFF, the educational warning keeps its "Consolidate notes…" action that opens the dialog. The Consolidate dialog's own intro (consolidate_desc) is likewise expanded from a one-liner into a plain-language explanation of what notes are and why consolidate. English source updated; the reworded existing keys keep their prior (valid, if terser) translations and the new wallet_size_auto_info falls back to English pending a translation pass. Build + tests + hygiene green. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
+10
-5
@@ -6467,7 +6467,6 @@ void App::maybeWarnLargeWallet()
|
||||
if (capture_mode_ || lite_wallet_) return; // no live nags during a UI sweep; lite has no wallet.dat
|
||||
if (window_background_) return; // when someone can see it
|
||||
if (!supportsFullNodeLifecycleActions() || !settings_) return;
|
||||
if (settings_->getAutoConsolidate()) return; // the background consolidator handles bloat quietly
|
||||
if (!state_.connected || !state_.encryption_state_known) return;
|
||||
if (state_.warming_up || state_.daemon_initializing || !state_.sync.isSynced()) return;
|
||||
if (large_wallet_checked_) return; // stat wallet.dat at most once per launch
|
||||
@@ -6484,10 +6483,16 @@ void App::maybeWarnLargeWallet()
|
||||
if (settings_->getLargeWalletWarned()) return; // already warned once for this bloat episode
|
||||
settings_->setLargeWalletWarned(true);
|
||||
settings_->save();
|
||||
ui::Notifications::instance().action(
|
||||
TR("wallet_size_warn"), ui::NotificationType::Warning,
|
||||
[]() { ui::ShieldDialog::showConsolidate(); },
|
||||
TR("wallet_size_consolidate"), 12.0f);
|
||||
// The message itself explains what notes are and why consolidating helps (it wraps in full in the
|
||||
// bell/alert panel and the Settings banner). With auto-consolidation on, reassure the user it's being
|
||||
// handled in the background rather than nudging manual action; otherwise offer the Consolidate dialog.
|
||||
if (settings_->getAutoConsolidate())
|
||||
ui::Notifications::instance().info(TR("wallet_size_auto_info"), 12.0f);
|
||||
else
|
||||
ui::Notifications::instance().action(
|
||||
TR("wallet_size_warn"), ui::NotificationType::Warning,
|
||||
[]() { ui::ShieldDialog::showConsolidate(); },
|
||||
TR("wallet_size_consolidate"), 12.0f);
|
||||
}
|
||||
|
||||
// Complementary on-disk safety net (full-node) for a wallet salvage we did NOT witness this launch — it
|
||||
|
||||
Reference in New Issue
Block a user