From 13b225d8f5a2bda6a61112f5426c2e20fc732d1c Mon Sep 17 00:00:00 2001 From: DanS Date: Thu, 13 Aug 2026 15:49:09 -0500 Subject: [PATCH] fix(send): prefix shielded-send memos with "utf8:" so the daemon accepts them MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A shielded send with a memo failed: "Invalid parameter, expected memo data in hexadecimal format or to use 'utf8:' prefix." The Send-tab path (and its fee-gap retry) put the user's plain-text memo straight into the z_sendmany recipient, which the daemon now rejects — it wants the memo hex-encoded or with a "utf8:" prefix. The chat path already prefixes with "utf8:"; do the same for user memos. Only the RPC recipient["memo"] is prefixed; the raw memo is still what's stored for the transaction-history display, and the daemon returns the decoded memoStr to receivers, so it round-trips as plain text. Co-Authored-By: Claude Opus 4.8 (1M context) --- src/app_network.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/app_network.cpp b/src/app_network.cpp index 1f8ed88..91f3083 100644 --- a/src/app_network.cpp +++ b/src/app_network.cpp @@ -5062,7 +5062,10 @@ void App::sendTransaction(const std::string& from, const std::string& to, recipient["address"] = to; recipient["amount"] = util::formatAmountFixed(amount); if (!memo.empty()) { - recipient["memo"] = memo; + // The daemon rejects a raw memo — it wants hex or a "utf8:" prefix. Prefix the user's plain-text + // memo so it's UTF-8-encoded into the note (same as the chat path). The unprefixed `memo` is still + // passed to submitZSendMany below for the tx-history display. + recipient["memo"] = "utf8:" + memo; } recipients.push_back(recipient); @@ -5206,7 +5209,7 @@ void App::resendWithFeeGapWorkaround(const std::string& from, const std::string& nlohmann::json primary; primary["address"] = to; primary["amount"] = util::formatAmountFixed(amount); - if (!memo.empty()) primary["memo"] = memo; + if (!memo.empty()) primary["memo"] = "utf8:" + memo; // daemon needs hex or a "utf8:" prefix (see submit) recipients.push_back(primary); nlohmann::json selfOut; selfOut["address"] = from;