From afa871c4df9cf6d4a0983907a42c5fc9e6a1c850 Mon Sep 17 00:00:00 2001 From: ai-bot Date: Wed, 14 Oct 2026 13:27:09 +0000 Subject: [PATCH] BR-002: warn at the wallet software row and the rotation card --- static/settings.js | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/static/settings.js b/static/settings.js index 6a08d8f..d772d56 100644 --- a/static/settings.js +++ b/static/settings.js @@ -19,6 +19,19 @@ let settings = { keys: [], wallet_software: [] }; // The two types a key can have (section 23.3). const typeOptions = [["hardware", "Hardware"], ["cloud", "Cloud"]]; +// The reminder that belongs with every free-text field (sections 2 and 15). +const SECRET_WARNING = "Never paste a seed phrase or a private key here."; + +function secretWarning() { + // A short reminder that sits with a free-text field. The server refuses a value + // that looks like a wallet secret and stores nothing, so the field says so + // before the user types (sections 2 and 15). + const warning = document.createElement("span"); + warning.className = "field-help secret-warning"; + warning.textContent = SECRET_WARNING; + return warning; +} + function emptyState(text) { const message = document.createElement("p"); message.className = "empty-state"; @@ -93,7 +106,9 @@ function softwareRow(name) { const input = makeTextInput(name); input.className = "software-name"; - row.append(makeField("Wallet software name", "wallet_software_name", input)); + const field = makeField("Wallet software name", "wallet_software_name", input); + field.append(secretWarning()); + row.append(field); const remove = document.createElement("button"); remove.type = "button"; @@ -243,6 +258,7 @@ function rotationCard(key) { const pathInput = makeTextInput(key.has_checks ? "" : key.address_path || "", 200); pathInput.className = "rotation-path"; card.append(makeField("Address path", `rotation_path_${key.id}`, pathInput)); + card.append(secretWarning()); const help = document.createElement("p"); help.className = "field-help";