1
0
Fork 0
forked from lthn/blockchain

fixed minor bug in wallet2::assign_account() + more getters for account_base

This commit is contained in:
sowle 2020-10-02 16:19:08 +03:00
parent 8b242b149c
commit 6a18d031ae
No known key found for this signature in database
GPG key ID: C07A24B2D89D49FC
2 changed files with 4 additions and 0 deletions

View file

@ -65,6 +65,8 @@ namespace currency
bool store(const std::string& file_path);
void make_account_watch_only();
bool is_watch_only() const { return m_keys.spend_secret_key == currency::null_skey; }
bool is_auditable() const { return m_keys.account_address.is_auditable(); }
template <class t_archive>
inline void serialize(t_archive &a, const unsigned int /*ver*/)

View file

@ -2324,6 +2324,8 @@ void wallet2::assign_account(const currency::account_base& acc)
clear();
m_account = acc;
init_log_prefix();
if (m_account.is_watch_only())
m_watch_only = true;
}
//----------------------------------------------------------------------------------------------------
void wallet2::generate(const std::wstring& path, const std::string& pass, bool auditable_wallet)