From c32f07ff05fe090a57e49b7c945fba0f99161999 Mon Sep 17 00:00:00 2001 From: woodser Date: Tue, 12 Jan 2021 13:11:11 -0500 Subject: [PATCH] use non-zero value instead of throwing in case of failed tx --- src/wallet/monero_wallet_model.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/wallet/monero_wallet_model.cpp b/src/wallet/monero_wallet_model.cpp index 4d8326c..df62d23 100644 --- a/src/wallet/monero_wallet_model.cpp +++ b/src/wallet/monero_wallet_model.cpp @@ -656,9 +656,10 @@ namespace monero { // otherwise merge transfer fields m_account_index = gen_utils::reconcile(m_account_index, other->m_account_index, "transfer m_account_index"); - // TODO monero core: failed m_tx in pool (after testUpdateLockedDifferentAccounts()) causes non-originating saved wallets to return duplicate incoming transfers but one has amount of 0 + // TODO monero core: failed tx in pool (after testUpdateLockedDifferentAccounts()) causes non-originating saved wallets to return duplicate incoming transfers but one has amount of 0 if (m_amount != boost::none && other->m_amount != boost::none && *m_amount != *other->m_amount && (*m_amount == 0 || *other->m_amount == 0)) { - throw std::runtime_error("failed tx in pool causes non-originating wallets to return duplicate incoming transfers but with one amount/m_num_suggested_confirmations of 0"); + std::cout << "WARNING: failed tx in pool causes non-originating wallets to return duplicate incoming transfers but with one amount/m_num_suggested_confirmations of 0, using non-zero amount" << std::endl; + if (*m_amount == 0) m_amount = other->m_amount; } else { m_amount = gen_utils::reconcile(m_amount, other->m_amount, "transfer amount"); }