diff --git a/src/ui/windows/console_tab.cpp b/src/ui/windows/console_tab.cpp index bc65c1e..bfcf8ad 100644 --- a/src/ui/windows/console_tab.cpp +++ b/src/ui/windows/console_tab.cpp @@ -1552,6 +1552,12 @@ bool IsDestructiveConsoleCommand(const std::string& firstLower, bool fullNode) if (n == firstLower) return cat.commands[i].destructive; } } + // Secret-revealing full-node commands that aren't in the reference catalog still deserve the gate + // (e.g. z_exportmnemonic dumps the seed phrase; the lite "seed" equivalent is already flagged). + if (fullNode) { + static const char* kSecretReveal[] = { "z_exportmnemonic", "z_exportviewingkey" }; + for (const char* s : kSecretReveal) if (firstLower == s) return true; + } return false; } } // namespace @@ -1882,6 +1888,9 @@ void ConsoleTab::renderCommandDetail(const ConsoleCommandEntry& cmd, const char* ImGui::SameLine(); if (material::TactileButton(TR("console_ref_run"), ImVec2(cbw, 0))) { pending_submit_ = built; + // The reference dialog already confirmed this run, so pre-arm the destructive gate to an exact + // match — otherwise the replayed submit re-arms it and silently does nothing until retyped. + destructive_confirm_cmd_ = built; command_search_[0] = '\0'; run_confirm_cmd_ = nullptr; show_commands_popup_ = false;