refactor: Implement restorewallet() logic in the wallet section

Currently restorewallet() logic is written in the RPC layer
and it can´t be reused by GUI. So it reimplements this in the
wallet and interface sections and then, GUI can access it.
This commit is contained in:
w0xlt
2021-12-14 19:18:56 -03:00
parent f727d814bd
commit 4807f73f48
4 changed files with 35 additions and 0 deletions

View File

@@ -322,6 +322,9 @@ public:
//! Return default wallet directory.
virtual std::string getWalletDir() = 0;
//! Restore backup wallet
virtual std::unique_ptr<Wallet> restoreWallet(const std::string& backup_file, const std::string& wallet_name, bilingual_str& error, std::vector<bilingual_str>& warnings) = 0;
//! Return available wallets in wallet directory.
virtual std::vector<std::string> listWalletDir() = 0;