mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-25 18:53:23 -03:00
Fix misleading RPC console wallet message
In certain circumstances, the GUI console will display the message 'Executing command without any wallet' when it is, in fact, using the default wallet. In RPC calls, if no wallet is explicitly selected and there is exactly one wallet loaded, the default is to act on that loaded wallet. The GUI console acts that way in reality, but erroneously reports that it's not acting on any particular wallet.
This commit is contained in:
parent
39363a4b94
commit
576f7b8614
1 changed files with 2 additions and 2 deletions
|
@ -780,8 +780,8 @@ void RPCConsole::addWallet(WalletModel * const walletModel)
|
|||
{
|
||||
// use name for text and wallet model for internal data object (to allow to move to a wallet id later)
|
||||
ui->WalletSelector->addItem(walletModel->getDisplayName(), QVariant::fromValue(walletModel));
|
||||
if (ui->WalletSelector->count() == 2 && !isVisible()) {
|
||||
// First wallet added, set to default so long as the window isn't presently visible (and potentially in use)
|
||||
if (ui->WalletSelector->count() == 2) {
|
||||
// First wallet added, set to default to match wallet RPC behavior
|
||||
ui->WalletSelector->setCurrentIndex(1);
|
||||
}
|
||||
if (ui->WalletSelector->count() > 2) {
|
||||
|
|
Loading…
Add table
Reference in a new issue