aboutsummaryrefslogtreecommitdiff
path: root/src/wallet
diff options
context:
space:
mode:
authorluigi1111 <luigi1111w@gmail.com>2019-10-14 18:09:44 -0500
committerluigi1111 <luigi1111w@gmail.com>2019-10-14 18:09:44 -0500
commitdd24d7f7fdb3df94403df2fc8ba15cf9c3aff238 (patch)
tree09b15ecab8174486c919a0d82ac5c80672160d7d /src/wallet
parentMerge pull request #5937 (diff)
parentRPC on_transfer_split error consistent with on_transfer if no tx sent (diff)
downloadmonero-dd24d7f7fdb3df94403df2fc8ba15cf9c3aff238.tar.xz
Merge pull request #5940
6b4bc0d RPC on_transfer_split error consistent with on_transfer if no tx sent (binaryFate)
Diffstat (limited to 'src/wallet')
-rw-r--r--src/wallet/wallet_rpc_server.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/wallet/wallet_rpc_server.cpp b/src/wallet/wallet_rpc_server.cpp
index c44be3404..dbd42ab81 100644
--- a/src/wallet/wallet_rpc_server.cpp
+++ b/src/wallet/wallet_rpc_server.cpp
@@ -982,6 +982,13 @@ namespace tools
std::vector<wallet2::pending_tx> ptx_vector = m_wallet->create_transactions_2(dsts, mixin, req.unlock_time, priority, extra, req.account_index, req.subaddr_indices);
LOG_PRINT_L2("on_transfer_split called create_transactions_2");
+ if (ptx_vector.empty())
+ {
+ er.code = WALLET_RPC_ERROR_CODE_TX_NOT_POSSIBLE;
+ er.message = "No transaction created";
+ return false;
+ }
+
return fill_response(ptx_vector, req.get_tx_keys, res.tx_key_list, res.amount_list, res.fee_list, res.multisig_txset, res.unsigned_txset, req.do_not_relay,
res.tx_hash_list, req.get_tx_hex, res.tx_blob_list, req.get_tx_metadata, res.tx_metadata_list, er);
}