feat(ui): large-wallet nudge in Node & Security
The BDB wallet.dat bloats with shielded-note witness data and never shrinks in place, so a mining/shielded wallet can grow past 500 MB. Below the Wallet Size row, show a one-line amber hint once wallet.dat crosses 500 MB with a "Consolidate notes…" shortcut that opens the Merge to Address (z_mergetoaddress) dialog. Full-node only (lite has no wallet.dat here); threshold is a single named constant. i18n keys fall back to English for non-English locales. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -2066,6 +2066,25 @@ void RenderSettingsPage(App* app) {
|
||||
else ImGui::TextDisabled("%s", wv);
|
||||
}
|
||||
|
||||
// Large-wallet nudge: the BDB wallet.dat bloats with shielded-note witness data and
|
||||
// never shrinks in place. Past a threshold, hint the user toward consolidating notes
|
||||
// (Merge to Address) to curb further growth. Full-node only (lite has no wallet.dat here).
|
||||
static constexpr uint64_t kWalletBloatWarnBytes = 500ull * 1024 * 1024; // 500 MB
|
||||
if (app->supportsFullNodeLifecycleActions() && wallet_size > kWalletBloatWarnBytes) {
|
||||
ImGui::Dummy(ImVec2(0, Layout::spacingSm()));
|
||||
ImGui::PushStyleColor(ImGuiCol_Text, Warning());
|
||||
ImGui::PushTextWrapPos(leftX + contentW);
|
||||
ImGui::TextWrapped("%s", TR("wallet_size_warn"));
|
||||
ImGui::PopTextWrapPos();
|
||||
ImGui::PopStyleColor();
|
||||
if (ImGui::IsItemHovered()) material::Tooltip("%s", TR("tt_wallet_size_warn"));
|
||||
ImGui::Dummy(ImVec2(0, Layout::spacingXs()));
|
||||
if (material::ActionButton("##walletconsolidate", TR("wallet_size_consolidate"),
|
||||
ICON_MD_CALL_MERGE, material::ActionTier::Secondary))
|
||||
ShieldDialog::show(ShieldDialog::Mode::MergeToAddress);
|
||||
if (ImGui::IsItemHovered()) material::Tooltip("%s", TR("tt_merge"));
|
||||
}
|
||||
|
||||
// Row 3: folder buttons (their own row so the path gets the full width).
|
||||
ImGui::Dummy(ImVec2(0, Layout::spacingXs()));
|
||||
material::ButtonFlow ff(contentW);
|
||||
|
||||
Reference in New Issue
Block a user