From 5205e6fd0b52c466a31142067428584f3ff8712d Mon Sep 17 00:00:00 2001 From: woodser Date: Sat, 1 Jun 2019 11:36:26 -0400 Subject: [PATCH] throwing error if store() does not throw error --- src/wallet/MoneroWallet.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/wallet/MoneroWallet.cpp b/src/wallet/MoneroWallet.cpp index 019bf29..a6b095a 100644 --- a/src/wallet/MoneroWallet.cpp +++ b/src/wallet/MoneroWallet.cpp @@ -405,12 +405,16 @@ namespace monero { void MoneroWallet::save() { cout << "save()" << endl; - save(nullptr, nullptr); + save("", ""); } void MoneroWallet::save(string path, string password) { cout << "save(" << path << ", " << password << ")" << endl; - throw runtime_error("Not implemented"); + if (path.empty()) { + wallet2->store(); // TODO: hopefully this fails if not known? + throw runtime_error("where is this storing to?"); + } + else wallet2->store_to(path, password); } void MoneroWallet::close() {