From 5ff0399568853c8d3624d29e6691bce856003978 Mon Sep 17 00:00:00 2001 From: sowle Date: Sat, 16 Aug 2025 05:13:15 +0300 Subject: [PATCH] simplewallet: transfer_so fixed --- src/simplewallet/simplewallet.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/simplewallet/simplewallet.cpp b/src/simplewallet/simplewallet.cpp index 26c1a698..7320b703 100644 --- a/src/simplewallet/simplewallet.cpp +++ b/src/simplewallet/simplewallet.cpp @@ -1840,7 +1840,14 @@ bool simple_wallet::transfer_so(const std::vector &args) std::stringstream ss; for (auto i : outs_idxs) + { ss << i << " "; + tools::transfer_details td{}; + if (!m_wallet->get_transfer_info_by_index(i, td) || !td.is_spendable()) + { + fail_msg_writer() << "output #" << i << ": wrong index or not spendable"; + } + } success_msg_writer() << "outputs' indicies allowed to spent: " << (outs_idxs.empty() ? std::string("all") : ss.str()); // 2nd arg: fee