aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/wallet2.cpp
diff options
context:
space:
mode:
authorluigi1111 <luigi1111w@gmail.com>2020-05-07 10:43:05 -0500
committerluigi1111 <luigi1111w@gmail.com>2020-05-07 10:43:05 -0500
commit4c2f78aeebf6d93a6f9d553bf199a1617639d9ca (patch)
treec88d9faaccef319a64bc23c5e7c5916ea93d314e /src/wallet/wallet2.cpp
parentMerge pull request #6503 (diff)
parentwallet2: fix keys file deserialization exception handling (diff)
downloadmonero-4c2f78aeebf6d93a6f9d553bf199a1617639d9ca.tar.xz
Merge pull request #6506
42e1484 wallet2: fix keys file deserialization exception handling (xiphon)
Diffstat (limited to 'src/wallet/wallet2.cpp')
-rw-r--r--src/wallet/wallet2.cpp8
1 files changed, 1 insertions, 7 deletions
diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp
index 02a067986..93e522a93 100644
--- a/src/wallet/wallet2.cpp
+++ b/src/wallet/wallet2.cpp
@@ -3990,13 +3990,7 @@ bool wallet2::load_keys(const std::string& keys_file_name, const epee::wipeable_
// Load keys from buffer
boost::optional<crypto::chacha_key> keys_to_encrypt;
- try {
- r = wallet2::load_keys_buf(keys_file_buf, password, keys_to_encrypt);
- } catch (const std::exception& e) {
- std::size_t found = string(e.what()).find("failed to deserialize keys buffer");
- THROW_WALLET_EXCEPTION_IF(found != std::string::npos, error::wallet_internal_error, "internal error: failed to deserialize \"" + keys_file_name + '\"');
- throw e;
- }
+ r = wallet2::load_keys_buf(keys_file_buf, password, keys_to_encrypt);
// Rewrite with encrypted keys if unencrypted, ignore errors
if (r && keys_to_encrypt != boost::none)