Skip to content

Commit 576f7b8

Browse files
committed
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.
1 parent 39363a4 commit 576f7b8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/qt/rpcconsole.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -780,8 +780,8 @@ void RPCConsole::addWallet(WalletModel * const walletModel)
780780
{
781781
// use name for text and wallet model for internal data object (to allow to move to a wallet id later)
782782
ui->WalletSelector->addItem(walletModel->getDisplayName(), QVariant::fromValue(walletModel));
783-
if (ui->WalletSelector->count() == 2 && !isVisible()) {
784-
// First wallet added, set to default so long as the window isn't presently visible (and potentially in use)
783+
if (ui->WalletSelector->count() == 2) {
784+
// First wallet added, set to default to match wallet RPC behavior
785785
ui->WalletSelector->setCurrentIndex(1);
786786
}
787787
if (ui->WalletSelector->count() > 2) {

0 commit comments

Comments
 (0)