fix(send): pass the user-selected fee to z_sendmany

The full-node send built the recipients array and called z_sendmany with only
(fromaddress, amounts) — dropping the minconf and fee positional args. The whole
fee-tier UI (Low/Normal/High, send-max math, the confirmation fee) was collected
and shown but never sent, so the daemon silently applied its own default fee and
the Low/High tiers were cosmetic.

Pass {from, recipients, 1, fee}, with the fee formatted fixed-decimal so the
daemon's ParseFixedPoint accepts it (a small double like 0.00005 would otherwise
serialize to "5e-05" and be rejected).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-06-07 14:15:58 -05:00
parent a6921bca60
commit 7195c25376

View File

@@ -2046,12 +2046,16 @@ void App::sendTransaction(const std::string& from, const std::string& to,
send_progress_active_ = true;
++send_submissions_in_flight_;
worker_->post([this, from, to, amount, memo, recipients, callback]() -> rpc::RPCWorker::MainCb {
// z_sendmany signature is (fromaddress, amounts, minconf, fee). Pass the user-selected
// fee explicitly — formatted as a fixed-decimal string so the daemon's ParseFixedPoint
// accepts it (a small double like 0.00005 would serialize to "5e-05" and be rejected).
const std::string fee_str = util::formatAmountFixed(fee);
worker_->post([this, from, to, amount, fee_str, memo, recipients, callback]() -> rpc::RPCWorker::MainCb {
bool ok = false;
std::string result_str;
try {
rpc::RPCClient::TraceScope trace("Send tab / Submit transaction");
auto result = rpc_->call("z_sendmany", {from, recipients});
auto result = rpc_->call("z_sendmany", {from, recipients, 1, fee_str});
result_str = result.get<std::string>();
ok = true;
} catch (const std::exception& e) {