feat(bootstrap,validate): Retry keeps the mirror; Validate works offline

- Bootstrap: Retry now reuses the source the user actually started (was always
  the default), and a "Try mirror" button offers the alternate server on
  failure (s_lastUrl remembered on start, cleared on a fresh Confirm).
- Validate Address: classification + checksum are local, so the dialog no
  longer requires a node connection — offline/lite now validate and show the
  type, with ownership reported as "Unknown — node offline / not checkable in
  the lite wallet" instead of a dead "not connected" screen.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-10-18 13:05:40 -05:00
co-authored by Claude Opus 4.8
parent f3f0b32a48
commit 7cea9b7339
3 changed files with 29 additions and 15 deletions
+10 -1
View File
@@ -45,6 +45,7 @@ public:
s_state = State::Confirm;
s_bootstrap.reset();
s_errorMsg.clear();
s_lastUrl.clear();
s_wasDaemonRunning = false;
}
@@ -314,9 +315,15 @@ private:
float btnW = 120.0f * dp;
if (TactileButton(TR("retry"), ImVec2(btnW, 0))) {
startDownload("");
startDownload(s_lastUrl); // keep the user's source/mirror choice (was startDownload(""))
}
ImGui::SameLine();
{
const std::string mirrorUrl = std::string(util::Bootstrap::kMirrorUrl) + "/" + util::Bootstrap::kZipName;
if (s_lastUrl != mirrorUrl && TactileButton(TR("bootstrap_try_mirror"), ImVec2(130.0f * dp, 0)))
startDownload(mirrorUrl);
ImGui::SameLine();
}
if (TactileButton(TR("close"), ImVec2(90.0f * dp, 0))) {
s_app->setBootstrapDownloading(false);
s_open = false;
@@ -336,6 +343,7 @@ private:
s_bootstrap->start(dataDir);
else
s_bootstrap->start(dataDir, url);
s_lastUrl = url; // remember what we started (set only after the guards passed)
s_state = State::Downloading;
s_errorMsg.clear();
s_cancelling = false;
@@ -347,6 +355,7 @@ private:
static inline std::unique_ptr<util::Bootstrap> s_bootstrap;
static inline bool s_wasDaemonRunning = false;
static inline bool s_cancelling = false; // cancel requested; disables the Cancel button until the worker stops
static inline std::string s_lastUrl; // last source started ("" = default); so Retry keeps the mirror choice
static inline std::string s_errorMsg;
};