Skip to content

Conversation

@meeh0w
Copy link
Member

@meeh0w meeh0w commented Oct 31, 2025

Changes

  • Adds the dialog that allows the user to setup a wallet policy for the Bitcoin app

Testing

  1. Onboard with Ledger
  2. Open the Bitcoin app on the device
  3. You should be prompted for public key and then to register an account in the BItcoin app
  4. For BIP44 - you should only have to do it once
  5. For LedgerLive - you will have to do it for every account

Screenshots:

Ledger.-.BTC.policy.mov

Checklist for the author

  • I've covered new/modified business logic with Jest test cases.
  • I've tested the changes myself before sending it to code review and QA.

Copy link
Contributor

@frichards frichards left a comment

Choose a reason for hiding this comment

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

I had few nits and questions.nothing major! Great job!

contentProps?: StackProps;
containerProps?: StackProps;
withViewSwitcher?: boolean;
titleProps?: TypographyProps;
Copy link
Contributor

Choose a reason for hiding this comment

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

titleProps seems like it is not getting used in the Page component. Do we need this one still?

Copy link
Member Author

Choose a reason for hiding this comment

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

Nope, good catch 👌


const Content = ComponentByPhase[phase];

console.log('DEBUG status', status, policyName);
Copy link
Contributor

Choose a reason for hiding this comment

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

can we remove this log?

Copy link
Member Author

Choose a reason for hiding this comment

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

We not only can, we need to :D Thanks!

setStatus('idle');
reset();

if (status.endsWith(':error')) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Since we set the status to be idle on line 33 and reset does not seem to update status, will this be ever true?

Copy link
Member Author

Choose a reason for hiding this comment

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

Oh, I see how this can be confusing.

setStatus (like all state setters) is async, meaning that status on line 36 is the same as it was before setStatus on line 33 was called.

I'll rearrange it a bit to make it less confusing :)

Copy link
Member Author

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah! This change now makes sense! Thank you for updating this!

Copy link
Contributor

@frichards frichards left a comment

Choose a reason for hiding this comment

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

🌈 🦄 Approved!

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.

3 participants