feat(ui): rework the consolidate/merge modal
Make Merge to Address actually serve wallet-bloat consolidation and be far less opaque. New ShieldDialog::showConsolidate() preset (used by the large-wallet Settings banner + alert action) frames it as "Consolidate funds" and targets shielded notes — the bloat the nudge warns about. - Source selector: consolidate shielded notes (ANY_SAPLING), transparent (ANY_TADDR), or both (*) — previously hardcoded to ANY_TADDR, which never reduced the shielded-witness bloat. Batch limit now applies to the right side. - Scope: on open, count spendable UTXOs + notes (listunspent / z_listunspent) and show "N transparent + M shielded · ~X DRGX"; warn "repeat to finish" when the set exceeds one batch. - Destination auto-selects the best spendable z-address (button enabled by default); empty wallets get an inline "Create shielded address" (z_getnewaddress). - Advanced disclosure hides Fee + "Max inputs per batch" (renamed from the "UTXO Limit" jargon) with sane defaults. - Inline confirm step before the fund-moving call (amount + input count + dest). - Live progress: self-polls z_getoperationstatus to show Consolidating… → Done/Failed, replacing the raw opid + manual "Check status" button. All three merge entry points now use the typed showMerge()/showConsolidate() (no stale-static leaks from direct show(MergeToAddress)). Shield-coinbase mode keeps working. New i18n keys fall back to English. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1248,7 +1248,7 @@ void RenderSettingsPage(App* app) {
|
||||
ShieldDialog::show(ShieldDialog::Mode::ShieldCoinbase);
|
||||
if (ImGui::IsItemHovered()) material::Tooltip("%s", TR("tt_shield_mining"));
|
||||
if (BTN("##wmerge", TR("settings_merge_to_address"), ICON_MD_CALL_MERGE))
|
||||
ShieldDialog::show(ShieldDialog::Mode::MergeToAddress);
|
||||
ShieldDialog::showMerge();
|
||||
if (ImGui::IsItemHovered()) material::Tooltip("%s", TR("tt_merge"));
|
||||
if (BTN("##wclear", TR("settings_clear_ztx"), ICON_MD_DELETE_SWEEP))
|
||||
s_settingsState.confirm_clear_ztx = true;
|
||||
@@ -2081,7 +2081,7 @@ void RenderSettingsPage(App* app) {
|
||||
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);
|
||||
ShieldDialog::showConsolidate();
|
||||
if (ImGui::IsItemHovered()) material::Tooltip("%s", TR("tt_merge"));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user