Register sweep surfaces so the redesigned Wave-1 modals get captured for visual review: modal-qr-popup, modal-request-payment, modal-validate-address, modal-address-label, modal-daemon-prompt, and modal-antivirus (the last renders only on Windows, where its #ifdef body compiles). Each is driven through the dialog's public show()/flag; teardown closes it. Adds a static hide() to RequestPaymentDialog / ValidateAddressDialog / AddressLabelDialog for clean sweep teardown (they had no public close). The contact add/edit and explorer block-detail modals are tab-embedded and not yet surfaced. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
56 lines
1.0 KiB
C++
56 lines
1.0 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 validating cryptocurrency addresses
|
|
*/
|
|
class ValidateAddressDialog {
|
|
public:
|
|
/**
|
|
* @brief Show the validate address dialog
|
|
*/
|
|
static void show();
|
|
|
|
/**
|
|
* @brief Render the dialog (call every frame)
|
|
* @param app Pointer to app instance for RPC calls
|
|
*/
|
|
static void render(App* app);
|
|
|
|
/**
|
|
* @brief Check if dialog is currently open
|
|
*/
|
|
static bool isOpen();
|
|
|
|
/**
|
|
* @brief Close the dialog (used by the UI sweep teardown)
|
|
*/
|
|
static void hide();
|
|
|
|
private:
|
|
static bool s_open;
|
|
static bool s_validated;
|
|
static bool s_validating;
|
|
static char s_address_input[512];
|
|
|
|
// Validation results
|
|
static bool s_is_valid;
|
|
static bool s_is_mine;
|
|
static std::string s_address_type;
|
|
static std::string s_error_message;
|
|
};
|
|
|
|
} // namespace ui
|
|
} // namespace dragonx
|