fix: Tier-2 involved mediums — send confirm re-validation + console JSON errors

- Send: re-validate against LIVE state at the "Confirm & Send" click (connected,
  not syncing, amount > 0, total <= available). The confirm dialog persists
  across frames, so a balance drop / sync restart / fee bump after Review could
  otherwise broadcast a now-invalid transaction; it now shows a clear message
  instead of sending.
- Console: a malformed JSON argument ({...}/[...] that fails to parse) was
  silently sent to the daemon as a plain string. Now the command fails with a
  clear "Argument N is not valid JSON" line instead of being silently mangled.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-07-05 14:00:16 -05:00
parent b2a8c4487e
commit dd9bc0bd2b
4 changed files with 24 additions and 2 deletions

View File

@@ -170,6 +170,10 @@ ConsoleRpcCall BuildConsoleRpcCall(const std::string& command)
call.params.push_back(parsed);
continue;
}
// Malformed JSON — fail the whole command instead of silently sending it as a string.
call.valid = false;
call.error = "Argument " + std::to_string(argIndex) + " is not valid JSON: " + arg;
return call;
}
if (arg == "true") {