Skip to content

frontend: sync account details with recv addr type#4125

Open
bznein wants to merge 1 commit into
BitBoxSwiss:masterfrom
bznein:syncAcctType
Open

frontend: sync account details with recv addr type#4125
bznein wants to merge 1 commit into
BitBoxSwiss:masterfrom
bznein:syncAcctType

Conversation

@bznein
Copy link
Copy Markdown
Collaborator

@bznein bznein commented May 11, 2026

Default the Bitcoin account details view to the persisted receive script type instead of always showing the first signing configuration.

This makes accounts configured to receive on Taproot open Account details on Taproot information by default, while preserving the existing toggle between available signing configurations.

Before asking for reviews, here is a check list of the most common things you might need to consider:

  • updating the Changelog
  • writing unit tests
  • checking if your changes affect other coins or tokens in unintended ways
  • testing on multiple environments (Qt, Android, ...)
  • having an AI review your changes

Default the Bitcoin account details view to the persisted receive script type
instead of always showing the first signing configuration.

This makes accounts configured to receive on Taproot open Account details on
Taproot information by default, while preserving the existing toggle between
available signing configurations.
@bznein bznein requested a review from thisconnect May 11, 2026 11:10
@bznein bznein marked this pull request as ready for review May 11, 2026 11:10
@bznein bznein requested a review from a team as a code owner May 11, 2026 11:10
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 11, 2026

Review Change Stack
No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: a97761d3-1704-4826-99ac-2ed9ebd9541b

📥 Commits

Reviewing files that changed from the base of the PR and between efef487 and cfc5c14.

📒 Files selected for processing (3)
  • CHANGELOG.md
  • frontends/web/src/routes/account/info/xpub-detail.tsx
  • frontends/web/tests/account-info.test.ts

📝 Walkthrough

Walkthrough

This PR adds logic to Bitcoin's account detail view to display the XPUB matching the persisted receive address script type by default. A new helper function maps the account's receiveScriptType to the corresponding signing configuration index. The XPubDetail component initializes viewXPub as undefined, computes a clamped safe index on render, and uses that safe index for XPUB navigation cycling. An end-to-end test verifies the feature by switching a wallet to Taproot receive type and confirming Taproot-specific labels appear on the account details page.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Collaborator

@thisconnect thisconnect left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tested LGTM


const showNextXPub = () => {
setViewXPub(prev => (prev + 1) % numberOfXPubs);
setViewXPub((safeViewXPub + 1) % numberOfXPubs);
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Probably fine, but in theory (if somebody clicks very fast 😅) the previous version was concurrency-safe and always based on latest state.

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.

2 participants