mirror of
https://github.com/wownero/wownero-cpp.git
synced 2026-11-12 19:24:05 +01:00
get_mnemonic() returns empty string if watch-only wallet
This commit is contained in:
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user