aboutsummaryrefslogtreecommitdiff
path: root/src/simplewallet/simplewallet.cpp
diff options
context:
space:
mode:
authorRiccardo Spagni <ric@spagni.net>2018-03-14 13:37:14 +0200
committerRiccardo Spagni <ric@spagni.net>2018-03-14 13:37:14 +0200
commit3bc2537f5a9d629780431211b779ce3e8c0205db (patch)
tree19643dcb48b2f004ee035449644e4ae31ea6d4a0 /src/simplewallet/simplewallet.cpp
parentMerge pull request #3360 (diff)
parentwallet: fixes and tweaks to the save_watch_only command (diff)
downloadmonero-3bc2537f5a9d629780431211b779ce3e8c0205db.tar.xz
Merge pull request #3369
1979d53d wallet: fixes and tweaks to the save_watch_only command (moneromooo-monero)
Diffstat (limited to 'src/simplewallet/simplewallet.cpp')
-rw-r--r--src/simplewallet/simplewallet.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/simplewallet/simplewallet.cpp b/src/simplewallet/simplewallet.cpp
index 3a81e89ed..71ce1574f 100644
--- a/src/simplewallet/simplewallet.cpp
+++ b/src/simplewallet/simplewallet.cpp
@@ -3150,7 +3150,17 @@ bool simple_wallet::save_watch_only(const std::vector<std::string> &args/* = std
return true;
}
- m_wallet->write_watch_only_wallet(m_wallet_file, pwd_container->password());
+ try
+ {
+ std::string new_keys_filename;
+ m_wallet->write_watch_only_wallet(m_wallet_file, pwd_container->password(), new_keys_filename);
+ success_msg_writer() << tr("Watch only wallet saved as: ") << new_keys_filename;
+ }
+ catch (const std::exception &e)
+ {
+ fail_msg_writer() << tr("Failed to save watch only wallet: ") << e.what();
+ return true;
+ }
return true;
}