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>
This commit is contained in:
@@ -58,6 +58,16 @@ bool KeyExportDialog::isOpen()
|
||||
return s_open;
|
||||
}
|
||||
|
||||
void KeyExportDialog::hide()
|
||||
{
|
||||
s_open = false;
|
||||
s_fetching = false;
|
||||
s_key.clear();
|
||||
s_show_key = false;
|
||||
s_error.clear();
|
||||
releaseQr();
|
||||
}
|
||||
|
||||
void KeyExportDialog::render(App* app)
|
||||
{
|
||||
if (!s_open) return;
|
||||
|
||||
@@ -44,6 +44,11 @@ public:
|
||||
*/
|
||||
static bool isOpen();
|
||||
|
||||
/**
|
||||
* @brief Close the dialog and clear the revealed key (used by the UI sweep teardown)
|
||||
*/
|
||||
static void hide();
|
||||
|
||||
private:
|
||||
static bool s_open;
|
||||
static bool s_fetching;
|
||||
|
||||
@@ -61,6 +61,14 @@ void ShieldDialog::showMerge()
|
||||
show(Mode::MergeToAddress);
|
||||
}
|
||||
|
||||
void ShieldDialog::hide()
|
||||
{
|
||||
s_open = false;
|
||||
s_operation_pending = false;
|
||||
s_status_message.clear();
|
||||
s_operation_id.clear();
|
||||
}
|
||||
|
||||
void ShieldDialog::render(App* app)
|
||||
{
|
||||
if (!s_open) return;
|
||||
|
||||
@@ -41,6 +41,11 @@ public:
|
||||
* @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
|
||||
|
||||
Reference in New Issue
Block a user