diff options
author | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2016-01-29 19:44:48 +0000 |
---|---|---|
committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2016-01-29 19:44:48 +0000 |
commit | b11539fda74c0eb1a2b86aa31105eb6addc17256 (patch) | |
tree | 34521ddabae5326fcd7e8f4cb200df80132edbe5 /src/simplewallet | |
parent | tx_pool: serialize missing kept_by_block flag (diff) | |
download | monero-b11539fda74c0eb1a2b86aa31105eb6addc17256.tar.xz |
wallet: detect and handle failed outgoing transfers
When a transaction is not found in the pool anymore, it is marked
as failed, and displayed as such in show_transfers.
Diffstat (limited to 'src/simplewallet')
-rw-r--r-- | src/simplewallet/simplewallet.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/simplewallet/simplewallet.cpp b/src/simplewallet/simplewallet.cpp index 053f14349..6a725f720 100644 --- a/src/simplewallet/simplewallet.cpp +++ b/src/simplewallet/simplewallet.cpp @@ -2298,7 +2298,8 @@ bool simple_wallet::show_transfers(const std::vector<std::string> &args_) std::string payment_id = string_tools::pod_to_hex(i->second.m_payment_id); if (payment_id.substr(16).find_first_not_of('0') == std::string::npos) payment_id = payment_id.substr(0,16); - message_writer() << (boost::format("%8.8s %6.6s %20.20s %s %s %14.14s") % tr("pending") % tr("out") % print_money(amount - pd.m_change) % string_tools::pod_to_hex(i->first) % payment_id % print_money(fee)).str(); + bool failed = pd.m_state == tools::wallet2::unconfirmed_transfer_details::failed; + message_writer() << (boost::format("%8.8s %6.6s %20.20s %s %s %14.14s") % (failed ? tr("failed") : tr("pending")) % tr("out") % print_money(amount - pd.m_change) % string_tools::pod_to_hex(i->first) % payment_id % print_money(fee)).str(); } } |