1
0
Fork 0
forked from lthn/blockchain

simplewallet: transfer_so fixed

This commit is contained in:
sowle 2025-08-16 05:13:15 +03:00
parent 935feb66f5
commit 5ff0399568
No known key found for this signature in database
GPG key ID: C07A24B2D89D49FC

View file

@ -1840,7 +1840,14 @@ bool simple_wallet::transfer_so(const std::vector<std::string> &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