mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 15:09:59 +01:00
Merge #15153: gui: Add Open Wallet menu
1951ea434gui: Show indeterminate progress dialog while opening walllet (João Barbosa)8847cdaaagui: Add OpenWalletActivity (João Barbosa)4c8982a88interfaces: Avoid interface instance if wallet is null (João Barbosa)be82dea23gui: Add thread to run background activity in WalletController (João Barbosa)6c49a55b4gui: Add Open Wallet menu (João Barbosa)32a8c6abfgui: Add openWallet and getWalletsAvailableToOpen to WalletController (João Barbosa)ab288b4e5interfaces: Add loadWallet to Node (João Barbosa)17abc0fd5wallet: Factor out LoadWallet (João Barbosa) Pull request description: The *Open Wallet* menu has all the available wallets currently not loaded. The list of the available wallets comes from `listWalletDir`. In the future the menu can be replaced by a custom dialog. <img width="674" alt="screenshot 2019-01-12 at 12 17 02" src="https://user-images.githubusercontent.com/3534524/51073166-ac041480-1664-11e9-8302-be81702bc146.png"> Tree-SHA512: ebfd75eee0c8264863748899843afab67dadb7dff21313c11e3cb5b6108d954978dd1f1ae786bc07580c5a771ea4ab38d18c1643c9b9b3683ed53f0f6c582e38
This commit is contained in:
@@ -130,6 +130,28 @@ void UnloadWallet(std::shared_ptr<CWallet>&& wallet)
|
||||
}
|
||||
}
|
||||
|
||||
std::shared_ptr<CWallet> LoadWallet(interfaces::Chain& chain, const WalletLocation& location, std::string& error, std::string& warning)
|
||||
{
|
||||
if (!CWallet::Verify(chain, location, false, error, warning)) {
|
||||
error = "Wallet file verification failed: " + error;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
std::shared_ptr<CWallet> wallet = CWallet::CreateWalletFromFile(chain, location);
|
||||
if (!wallet) {
|
||||
error = "Wallet loading failed.";
|
||||
return nullptr;
|
||||
}
|
||||
AddWallet(wallet);
|
||||
wallet->postInitProcess();
|
||||
return wallet;
|
||||
}
|
||||
|
||||
std::shared_ptr<CWallet> LoadWallet(interfaces::Chain& chain, const std::string& name, std::string& error, std::string& warning)
|
||||
{
|
||||
return LoadWallet(chain, WalletLocation(name), error, warning);
|
||||
}
|
||||
|
||||
const uint32_t BIP32_HARDENED_KEY_LIMIT = 0x80000000;
|
||||
|
||||
const uint256 CMerkleTx::ABANDON_HASH(uint256S("0000000000000000000000000000000000000000000000000000000000000001"));
|
||||
|
||||
Reference in New Issue
Block a user