-
Notifications
You must be signed in to change notification settings - Fork 149
ui: add per-network lock/unlock/configure controls to wallet page #3490
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
ui: add per-network lock/unlock/configure controls to wallet page #3490
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR enhances the Wallets page to provide per-network wallet controls and improves how multi-network/ticker relationships are detected for UI updates.
Changes:
- Added per-network Lock, Unlock, and Configure controls to each network row in the Balance Breakdown table, wiring them to the existing wallet lock/open/reconfig flows.
- Introduced
TickerAsset.isRelatedAssetto treat both network assets and their parent assets as related, and used it in places that decide when to refresh the selected ticker’s display. - Updated wallet state handling to refresh the displayed ticker when any related asset’s wallet state changes, and wired per-network buttons into the HTML template.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
client/webserver/site/src/js/wallets.ts |
Adds per-network lock/unlock/config behavior to the balance breakdown rows and switches some ticker-refresh conditions to use the new isRelatedAsset helper. |
client/webserver/site/src/js/assets.ts |
Adds TickerAsset.isRelatedAsset to determine whether a given asset ID is part of (or the parent of) the current ticker’s network assets. |
client/webserver/site/src/html/wallets.tmpl |
Extends the balance breakdown row template with per-network Txs/Create/Lock/Unlock/Configure controls and layout tweaks. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| Doc.setVis(canUnlock, tmpl.unlockNetBttn) | ||
| Doc.setVis(canLock, tmpl.lockNetBttn) | ||
| Doc.setVis(running && !disabled, tmpl.configNetBttn) |
Copilot
AI
Jan 23, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For the per-network controls, the config button is only made visible when running && !disabled (or in the else if (usable) fallback), whereas the main walletConfig section is shown for any existing wallet regardless of running state. This means a user can reconfigure a stopped wallet via the main "Configure" button but not via the per-network row, which seems inconsistent with the rest of the UI and the PR goal of adding per-network configure controls. Consider basing the visibility of configNetBttn on the existence of a wallet (and possibly its disabled status) rather than its running flag so that row-level configuration behaves consistently with the main configuration controls.
| Doc.setVis(running && !disabled, tmpl.configNetBttn) | |
| Doc.setVis(!disabled, tmpl.configNetBttn) |
|
Some issues and questions: Do we still need to have the configuration section if we have a per-network configuration on each row? There's some information on the configuration section that we cannot see when clicking the configuration button.. I'm not sure how that could be displayed. Maybe update the configuration popup to include that? Currently, if you disable the wallet, you no longer see the configuration button to re-enable the wallet. There is a big "Create wallet" button that shows up on some of the pages. For example on bitcoin, it says "Create Bitcoin Wallet", but it only creates the native bitcoin wallet and not the "WBTC" wallet. I think we should get rid of the big button, and just create the wallets on each network row. We also don't have connect button or manage peer buttons on the network rows. If we add all these it might be a bit cluttered. Maybe we need a different design? @buck54321 do you have any thoughts on the design? |
Thanks @martonp for the detailed review! Here are my thoughts on each point:
|
Close #3476
This PR:
After changed:
