diff options
author | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2022-08-07 15:19:32 +0000 |
---|---|---|
committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2022-08-16 14:22:33 +0000 |
commit | 692f1d4e3d2567fcfd4b3cb2c702fb4ea8e82d79 (patch) | |
tree | dc37a26893e97cafc3263da11e50d4785d161525 /src | |
parent | wallet2: prevent importing outputs in a hot wallet (diff) | |
download | monero-692f1d4e3d2567fcfd4b3cb2c702fb4ea8e82d79.tar.xz |
wallet2: do not assume imported outputs must be non empty
Diffstat (limited to 'src')
-rw-r--r-- | src/wallet/wallet2.cpp | 4 |
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) { |