wallet2: better error when restoring a wallet with the wrong keys

This commit is contained in:
moneromooo-monero 2019-11-28 18:21:53 +00:00
parent 411f1b0ee3
commit 316ab7b56e
No known key found for this signature in database
GPG Key ID: 686F07454D6CEFC3
1 changed files with 1 additions and 1 deletions

View File

@ -4236,7 +4236,7 @@ bool wallet2::load_keys(const std::string& keys_file_name, const epee::wipeable_
r = r && hwdev.verify_keys(keys.m_view_secret_key, keys.m_account_address.m_view_public_key); r = r && hwdev.verify_keys(keys.m_view_secret_key, keys.m_account_address.m_view_public_key);
if(!m_watch_only && !m_multisig && hwdev.device_protocol() != hw::device::PROTOCOL_COLD) if(!m_watch_only && !m_multisig && hwdev.device_protocol() != hw::device::PROTOCOL_COLD)
r = r && hwdev.verify_keys(keys.m_spend_secret_key, keys.m_account_address.m_spend_public_key); r = r && hwdev.verify_keys(keys.m_spend_secret_key, keys.m_account_address.m_spend_public_key);
THROW_WALLET_EXCEPTION_IF(!r, error::invalid_password); THROW_WALLET_EXCEPTION_IF(!r, error::wallet_files_doesnt_correspond, m_keys_file, m_wallet_file);
if (r) if (r)
setup_keys(password); setup_keys(password);