aboutsummaryrefslogtreecommitdiff
path: root/src/simplewallet
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2016-04-03 12:51:28 +0100
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2016-04-09 12:40:32 +0100
commitf17b2f42b28844657624e8ea41172b34f17fb2e3 (patch)
tree2e2a7b5523491049ab14ce40a53591e395ff1bd7 /src/simplewallet
parentMerge pull request #799 (diff)
downloadmonero-f17b2f42b28844657624e8ea41172b34f17fb2e3.tar.xz
rpc: add pool/blockchain and block height results to gettransactions
Diffstat (limited to 'src/simplewallet')
-rw-r--r--src/simplewallet/simplewallet.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/simplewallet/simplewallet.cpp b/src/simplewallet/simplewallet.cpp
index aa571755f..30c958381 100644
--- a/src/simplewallet/simplewallet.cpp
+++ b/src/simplewallet/simplewallet.cpp
@@ -2497,13 +2497,18 @@ bool simple_wallet::check_tx_key(const std::vector<std::string> &args_)
COMMAND_RPC_GET_TRANSACTIONS::response res;
req.txs_hashes.push_back(epee::string_tools::pod_to_hex(txid));
if (!net_utils::invoke_http_json_remote_command2(m_daemon_address + "/gettransactions", req, res, m_http_client) ||
- res.txs_as_hex.empty())
+ (res.txs.empty() && res.txs_as_hex.empty()))
{
fail_msg_writer() << tr("failed to get transaction from daemon");
return true;
}
cryptonote::blobdata tx_data;
- if (!string_tools::parse_hexstr_to_binbuff(res.txs_as_hex.front(), tx_data))
+ bool ok;
+ if (!res.txs.empty())
+ ok = string_tools::parse_hexstr_to_binbuff(res.txs.front().as_hex, tx_data);
+ else
+ ok = string_tools::parse_hexstr_to_binbuff(res.txs_as_hex.front(), tx_data);
+ if (!ok)
{
fail_msg_writer() << tr("failed to parse transaction from daemon");
return true;