Skip to content

Commit

Permalink
Merge pull request #103 from victor-tucci/default-hwdev-file
Browse files Browse the repository at this point in the history
Create HWDEV file by default for hardware wallets
  • Loading branch information
sanada08 authored Jun 15, 2023
2 parents 95877a1 + 29ebce8 commit 16d7404
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions src/wallet/wallet2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4972,12 +4972,13 @@ void wallet2::restore_from_device(const fs::path& wallet_, const epee::wipeable_
m_subaddress_lookahead_major = 5;
m_subaddress_lookahead_minor = 20;
}
if (hwdev_label) {
fs::path hwdev_txt = m_wallet_file;
hwdev_txt += ".hwdev.txt";
if (!tools::dump_file(hwdev_txt, *hwdev_label))
MERROR("failed to write .hwdev.txt comment file");
}

fs::path hwdev_filename = m_wallet_file;
hwdev_filename += ".hwdev.txt";
std::string hwdev_text = hwdev_label.value_or("");
if (!tools::dump_file(hwdev_filename, hwdev_text))
MERROR("failed to write .hwdev.txt comment file");

if (progress_callback)
progress_callback(tr("Setting up account and subaddresses"));
setup_new_blockchain();
Expand Down

0 comments on commit 16d7404

Please sign in to comment.