diff --git a/src/wallet/view_iface.h b/src/wallet/view_iface.h index ccdfe1e6..48a87459 100644 --- a/src/wallet/view_iface.h +++ b/src/wallet/view_iface.h @@ -424,12 +424,14 @@ public: uint64_t wallet_id; transfers_array recent_history; wallet_info wi; + std::string seed; bool recovered; BEGIN_KV_SERIALIZE_MAP() KV_SERIALIZE(wallet_id) KV_SERIALIZE(recent_history) KV_SERIALIZE(wi) + KV_SERIALIZE(seed) KV_SERIALIZE(recovered) END_KV_SERIALIZE_MAP() }; diff --git a/src/wallet/wallets_manager.cpp b/src/wallet/wallets_manager.cpp index 9da7eaf6..61a46d3d 100644 --- a/src/wallet/wallets_manager.cpp +++ b/src/wallet/wallets_manager.cpp @@ -717,6 +717,7 @@ std::string wallets_manager::open_wallet(const std::wstring& path, const std::st //w->get_unconfirmed_transfers(owr.recent_history.unconfirmed); w->get_unconfirmed_transfers(owr.recent_history.history); //workaround for missed fee + owr.seed = w->get_account().get_restore_braindata(); break; } catch (const tools::error::file_not_found& /**/) @@ -790,6 +791,7 @@ std::string wallets_manager::generate_wallet(const std::wstring& path, const std try { w->generate(path, password); + owr.seed = w->get_account().get_restore_braindata(); } catch (const tools::error::file_exists/*& e*/) { @@ -877,6 +879,7 @@ std::string wallets_manager::restore_wallet(const std::wstring& path, const std: try { w->restore(path, password, restore_key); + owr.seed = w->get_account().get_restore_braindata(); } catch (const tools::error::file_exists/*& e*/) {