Skip to content
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

fix: extraneous btc policy prompt #80

Merged
merged 1 commit into from
Oct 23, 2024
Merged

fix: extraneous btc policy prompt #80

merged 1 commit into from
Oct 23, 2024

Conversation

meeh0w
Copy link
Member

@meeh0w meeh0w commented Oct 23, 2024

Description

  • We would show the BTC policy prompt when user was switching AWAY from the Ledger account, because activeAccount was being updated, but walletDetails.type was still reporting "ledger". We would then go ahead and try to fetch the policy for a non-Ledger account.

Changes

  • With this change, we'll wait for activeAccount and walletDetails to be in sync, ensuring it only runs when user switches to Ledger accounts (which don't have the policy registered yet).

Testing

  • Onboard with Ledger
  • Import seed phrase
  • Switch to the Ledger account
  • Connect Ledger device & go to the Bitcoin app
  • You should be prompted for BTC policy
  • Switch to the seed phrase account
  • You should not be prompted for BTC policy

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.

@meeh0w meeh0w merged commit 437a56f into main Oct 23, 2024
4 of 5 checks passed
@meeh0w meeh0w deleted the fix/btc-ledger-policy branch October 23, 2024 10:57
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