From 6741f57a98c4a0b17c4f6f429f57edac6a9a2708 Mon Sep 17 00:00:00 2001 From: woodser Date: Mon, 9 Mar 2020 10:54:24 -0400 Subject: [PATCH] get_mnemonic() returns empty string if watch-only wallet --- src/wallet/monero_wallet_core.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wallet/monero_wallet_core.cpp b/src/wallet/monero_wallet_core.cpp index 1bf8aad..3dd0299 100644 --- a/src/wallet/monero_wallet_core.cpp +++ b/src/wallet/monero_wallet_core.cpp @@ -1013,7 +1013,7 @@ namespace monero { } string monero_wallet_core::get_mnemonic() const { - if (m_w2->watch_only()) throw runtime_error("The wallet is watch-only. Cannot retrieve mnemonic."); + if (m_w2->watch_only()) return ""; epee::wipeable_string wipeable_mnemonic; m_w2->get_seed(wipeable_mnemonic); return string(wipeable_mnemonic.data(), wipeable_mnemonic.size());