GUI: Keep the RPC console on the wallet it is set to - #344
Merged
luke-jr merged 1 commit intoAug 7, 2026
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
Note
Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.
This PR changes the Qt RPC console wallet selection behavior so it remains on the wallet chosen within the console, instead of being overridden by wallet open/restore/create flows in the main window.
Changes:
- Removed
RPCConsole::setCurrentWallet()API (declaration + implementation). - Dropped signal/slot connections from wallet open/restore/create activities that forced the RPC console to switch wallets.
- Kept existing default behavior where the console initially selects the first loaded wallet via
RPCConsole::addWallet().
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/qt/rpcconsole.h | Removes the setCurrentWallet slot from the RPC console interface. |
| src/qt/rpcconsole.cpp | Removes the setCurrentWallet implementation that updated the wallet selector index. |
| src/qt/bitcoingui.cpp | Removes connections that previously changed the RPC console wallet during open/restore/create wallet flows. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
luke-jr
reviewed
Jul 25, 2026
kwsantiago
force-pushed
the
fix-rpcconsole-wallet-selection-consistency
branch
from
July 25, 2026 19:55
2cbc43f to
020102d
Compare
kwsantiago
force-pushed
the
fix-rpcconsole-wallet-selection-consistency
branch
from
July 26, 2026 01:02
020102d to
2b54c09
Compare
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bugfix-only alternative to #331, for the case where the feature in that PR is not wanted.
99c0eb9 ("Fix RPCConsole wallet selection") made the RPC console follow the wallet opened from the menu bar, but only for the open, restore and create activities. The toolbar selector and wallet migration were never connected, so the console follows the main window on some paths and not others, and a wallet deliberately picked in the console gets overridden by the paths that are connected.
This drops those three connects, so the console keeps whatever wallet it is set to. It defaults to the first wallet loaded, as
RPCConsole::addWallet()already does, and only the console's own selector changes it.Based on branch-26 (96ec3b6), the oldest branch carrying the connects.
Testing
bitcoin-qton regtest, started withwallet_aandwallet_b, console selector onwallet_a.wallet_aand commands run againstwallet_a. Before this change the console jumped to the newly opened wallet.wallet_a.test_bitcoin-qtpasses.