Qt: Get wallet name from WalletModel rather than passing it around

This commit is contained in:
Luke Dashjr
2017-10-12 07:22:48 +00:00
committed by Jonas Schnelli
parent 12d8d2681e
commit b6d04fc7cc
7 changed files with 20 additions and 16 deletions

View File

@ -688,8 +688,9 @@ void RPCConsole::setClientModel(ClientModel *model)
}
#ifdef ENABLE_WALLET
void RPCConsole::addWallet(const QString name, WalletModel * const walletModel)
void RPCConsole::addWallet(WalletModel * const walletModel)
{
const QString name = walletModel->getWalletName();
// use name for text and internal data object (to allow to move to a wallet id later)
ui->WalletSelector->addItem(name, name);
if (ui->WalletSelector->count() == 2 && !isVisible()) {