aboutsummaryrefslogtreecommitdiff
path: root/src/qt/rpcconsole.cpp
diff options
context:
space:
mode:
authorJohn Moffett <john.moff@gmail.com>2023-01-09 14:14:43 -0500
committerJohn Moffett <john.moff@gmail.com>2023-01-09 16:02:25 -0500
commit576f7b86147447215566f0b15ef0b56cd1282929 (patch)
treeb6ba860dc779b960f6e4e9a56eeba76f8462f0e2 /src/qt/rpcconsole.cpp
parent39363a4b945114f5e4718f75098f3036e8fe6a1d (diff)
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.
Diffstat (limited to 'src/qt/rpcconsole.cpp')
-rw-r--r--src/qt/rpcconsole.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/qt/rpcconsole.cpp b/src/qt/rpcconsole.cpp
index 843cd46d13..b46a3c039b 100644
--- a/src/qt/rpcconsole.cpp
+++ b/src/qt/rpcconsole.cpp
@@ -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) {