refactor: Move wallet methods out of chain.h and node.h

Add WalletClient interface so node interface is cleaner and don't need
wallet-specific methods.

The new NodeContext::wallet_client pointer will also be needed to eliminate
global wallet variables like ::vpwallets, because createWallet(), loadWallet(),
getWallets(), etc methods called by the GUI need a way to get a reference to
the list of open wallets if it is no longer a global variable.

Also tweaks splash screen registration for load wallet events to be delayed
until after wallet client is created.
This commit is contained in:
Russell Yanofsky
2020-05-28 09:48:30 -04:00
parent b266b3e0bf
commit e4f4350471
20 changed files with 111 additions and 139 deletions

View File

@@ -581,7 +581,7 @@ QString WalletModel::getDisplayName() const
bool WalletModel::isMultiwallet()
{
return m_node.getWallets().size() > 1;
return m_node.walletClient().getWallets().size() > 1;
}
void WalletModel::refresh(bool pk_hash_only)