1
0
Fork 0
forked from lthn/blockchain

added seed data to inital api calls

This commit is contained in:
cryptozoidberg 2020-02-13 22:28:17 +01:00
parent 74092e500b
commit 5cc30aa01d
No known key found for this signature in database
GPG key ID: 22DEB97A54C6FDEC
2 changed files with 5 additions and 0 deletions

View file

@ -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()
};

View file

@ -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*/)
{