aboutsummaryrefslogtreecommitdiff
path: root/src/wallet
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2022-08-07 15:19:32 +0000
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2022-09-06 18:25:48 +0000
commit4b7eb573b2925306fe84a6fff8e25bd0062b1082 (patch)
tree80018312bf8e1b09a614143f70ac838e62c97a26 /src/wallet
parentwallet2: prevent importing outputs in a hot wallet (diff)
downloadmonero-4b7eb573b2925306fe84a6fff8e25bd0062b1082.tar.xz
wallet2: do not assume imported outputs must be non empty
Diffstat (limited to 'src/wallet')
-rw-r--r--src/wallet/wallet2.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp
index aba929855..9caf43cbb 100644
--- a/src/wallet/wallet2.cpp
+++ b/src/wallet/wallet2.cpp
@@ -6606,7 +6606,7 @@ bool wallet2::sign_tx(unsigned_tx_set &exported_txs, std::vector<wallet2::pendin
{
if (!exported_txs.new_transfers.second.empty())
import_outputs(exported_txs.new_transfers);
- else
+ else if (exported_txs.transfers.second.empty())
import_outputs(exported_txs.transfers);
// sign the transactions
@@ -13395,7 +13395,7 @@ size_t wallet2::import_outputs_from_str(const std::string &outputs_st)
outputs.second = {};
}
- imported_outputs = new_outputs.second.empty() ? import_outputs(outputs) : import_outputs(new_outputs);
+ imported_outputs = !new_outputs.second.empty() ? import_outputs(new_outputs) : !outputs.second.empty() ? import_outputs(outputs) : 0;
}
catch (const std::exception &e)
{