From adc1efbbd9db0abe30e24634eb1888c8bf0054a5 Mon Sep 17 00:00:00 2001 From: sowle Date: Tue, 11 Aug 2020 15:00:28 +0300 Subject: [PATCH] attempt to fix #203 --- src/wallet/wallets_manager.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/wallet/wallets_manager.cpp b/src/wallet/wallets_manager.cpp index 030b058d..87de1c8e 100644 --- a/src/wallet/wallets_manager.cpp +++ b/src/wallet/wallets_manager.cpp @@ -1626,8 +1626,12 @@ std::string wallets_manager::get_mining_history(uint64_t wallet_id, tools::walle std::string wallets_manager::get_wallet_restore_info(uint64_t wallet_id, std::string& restore_key) { GET_WALLET_OPT_BY_ID(wallet_id, wo); + + if (wo.wallet_state != view::wallet_status_info::wallet_state_ready || wo.long_refresh_in_progress) + return API_RETURN_CODE_CORE_BUSY; + restore_key = wo.w->get()->get_account().get_seed_phrase(); -// restore_key = tools::base58::encode(rst_data); + return API_RETURN_CODE_OK; } void wallets_manager::prepare_wallet_status_info(wallet_vs_options& wo, view::wallet_status_info& wsi)