Skip to content

Conversation

@JustinBeBoy
Copy link
Contributor

Close #3476

This PR:

  • Add per-network Lock, Unlock, and Configure buttons to each row in the Balance Breakdown table on the Wallets page.

After changed:
image

@JustinBeBoy JustinBeBoy marked this pull request as ready for review January 23, 2026 09:56
Copilot AI review requested due to automatic review settings January 23, 2026 09:56
Copy link
Contributor

Copilot AI left a 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.isRelatedAsset to 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)
Copy link

Copilot AI Jan 23, 2026

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.

Suggested change
Doc.setVis(running && !disabled, tmpl.configNetBttn)
Doc.setVis(!disabled, tmpl.configNetBttn)

Copilot uses AI. Check for mistakes.
@martonp
Copy link
Collaborator

martonp commented Jan 23, 2026

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?

@JustinBeBoy
Copy link
Contributor Author

JustinBeBoy commented Jan 27, 2026

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:
You raise a valid point. Since we now have per-network controls, the main Wallet Configuration section may be redundant.
Would it make sense to remove the Wallet Configuration section entirely and move all its functionality into the per-network row controls?
If we do this, we could consolidate everything into a Wallet Settings popup when clicking the Configure button on each network row. This popup could include:

  • Wallet metadata (Type, Class, Status)
  • Sync info (Peer Count, Block Sync, Blocks)
  • Reconfiguration form
  • Manage Peers popup
    Additionally, I think the big "Create wallet" button can be removed to use per-network row buttons instead and the connect button will be instead of lock button when wallet is disabled.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Wallet Page Configuration

2 participants