aboutsummaryrefslogtreecommitdiff
path: root/src/qt/rpcconsole.h
diff options
context:
space:
mode:
authorJohn Moffett <john.moff@gmail.com>2023-01-09 14:39:00 -0500
committerJohn Moffett <john.moff@gmail.com>2023-07-03 12:07:30 -0400
commit99c0eb9701e71f16aa360a420b7e4851d5b92510 (patch)
tree28a9f5346b7c94abf1c561d7daceccd32eaaa783 /src/qt/rpcconsole.h
parentb264410e012a61b103e1a03c43df4e17b9b75452 (diff)
downloadbitcoin-99c0eb9701e71f16aa360a420b7e4851d5b92510.tar.xz
Fix RPCConsole wallet selection
If a user opens multiple wallets in the GUI from the menu bar, the last one opened is the active one in the main window. However, For the RPC Console window, the _first_ one opened is active. This can be confusing, as wallet RPC commands may be sent to a wallet the user didn't intend. This commit makes the RPC Console switch to the wallet opened from the menu bar.
Diffstat (limited to 'src/qt/rpcconsole.h')
-rw-r--r--src/qt/rpcconsole.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/qt/rpcconsole.h b/src/qt/rpcconsole.h
index 32a7520491..65eef7fbba 100644
--- a/src/qt/rpcconsole.h
+++ b/src/qt/rpcconsole.h
@@ -136,6 +136,10 @@ public Q_SLOTS:
void unbanSelectedNode();
/** set which tab has the focus (is visible) */
void setTabFocus(enum TabTypes tabType);
+#ifdef ENABLE_WALLET
+ /** Set the current (ie - active) wallet */
+ void setCurrentWallet(WalletModel* const wallet_model);
+#endif // ENABLE_WALLET
private:
struct TranslatedStrings {