Files
ObsidianDragon/src/ui/windows/shield_dialog.h
DanS 1a41dec8d8 test(sweep): add capture surfaces for the Wave-2 fund/secret modals
Register sweep surfaces for the redesigned Wave-2 modals so they get captured for
visual review: modal-shield + modal-merge (ShieldDialog's two modes),
modal-transfer (a z->t transfer so the converted deshielding DialogWarningHeader
renders), and modal-key-export (KeyExportDialog — named distinctly from the
settings modal-export-key). Each setup opens the dialog through its public show()
without clicking any button, so no async RPC fires; teardown closes it.

Adds a static hide() to ShieldDialog and KeyExportDialog for clean sweep teardown
(AddressTransferDialog already had close()). KeyExportDialog::hide() also clears the
revealed key + frees its QR, mirroring the dialog's own close/dismiss secret-wipe.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-14 18:37:22 -05:00

53 lines
1.1 KiB
C++

// DragonX Wallet - ImGui Edition
// Copyright 2024-2026 The Hush Developers
// Released under the GPLv3
#pragma once
#include <string>
namespace dragonx {
class App;
namespace ui {
/**
* @brief Dialog for shielding coinbase rewards and merging funds
*/
class ShieldDialog {
public:
enum class Mode {
ShieldCoinbase, // Shield mining rewards (t-addr coinbase -> z-addr)
MergeToAddress // Merge multiple inputs to single z-addr
};
/**
* @brief Show the shield dialog
* @param mode Operating mode
*/
static void show(Mode mode = Mode::ShieldCoinbase);
/**
* @brief Show shield coinbase dialog for specific address
*/
static void showShieldCoinbase(const std::string& fromAddress = "*");
/**
* @brief Show merge to address dialog
*/
static void showMerge();
/**
* @brief Render the dialog (call each frame)
*/
static void render(App* app);
/**
* @brief Close the dialog (used by the UI sweep teardown)
*/
static void hide();
};
} // namespace ui
} // namespace dragonx