mirror of
https://github.com/wownero/wownero-cpp.git
synced 2026-10-30 12:38:32 +01:00
get_mnemonic(), get_mnemonic_language() throws if watch-only
This commit is contained in:
@@ -994,7 +994,15 @@ namespace monero {
|
||||
return static_cast<monero_network_type>(m_w2->nettype());
|
||||
}
|
||||
|
||||
string monero_wallet_core::get_mnemonic() const {
|
||||
if (m_w2->watch_only()) throw runtime_error("The wallet is watch-only. Cannot retrieve mnemonic.");
|
||||
epee::wipeable_string wipeable_mnemonic;
|
||||
m_w2->get_seed(wipeable_mnemonic);
|
||||
return string(wipeable_mnemonic.data(), wipeable_mnemonic.size());
|
||||
}
|
||||
|
||||
string monero_wallet_core::get_mnemonic_language() const {
|
||||
if (m_w2->watch_only()) throw runtime_error("The wallet is watch-only. Cannot retrieve mnemonic language.");
|
||||
return m_w2->get_seed_language();
|
||||
}
|
||||
|
||||
@@ -1004,12 +1012,6 @@ namespace monero {
|
||||
return languages;
|
||||
}
|
||||
|
||||
string monero_wallet_core::get_mnemonic() const {
|
||||
epee::wipeable_string wipeable_mnemonic;
|
||||
m_w2->get_seed(wipeable_mnemonic);
|
||||
return string(wipeable_mnemonic.data(), wipeable_mnemonic.size());
|
||||
}
|
||||
|
||||
string monero_wallet_core::get_public_view_key() const {
|
||||
MTRACE("get_private_view_key()");
|
||||
return epee::string_tools::pod_to_hex(m_w2->get_account().get_keys().m_account_address.m_view_public_key);
|
||||
|
||||
Reference in New Issue
Block a user