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: πŸ” device selection after aborted flow #7778

Merged
merged 4 commits into from
Sep 10, 2024

Conversation

thesan
Copy link
Contributor

@thesan thesan commented Sep 9, 2024

βœ… Checklist

  • npx changeset was attached.
  • Covered by automatic tests.
  • Impact of the changes:
    • ...

πŸ“ Description

I'm opened to alternative solutions.

TLDR: I'm not completely satisfied with this solution but I don't see another way which doesn't involve a major refactor.

The issue comes from the current structure of DeviceActionModal which relies on the device prop and result internal state to trigger the drawer. Once result is set the drawer is not supposed to re-opened and since device is not necessary reset something like this doesn't always work:

useEffect(() => {
  if (!device) return () => setResult(null);
}, [device]);

(also it might break some other flow unrelated to ledger sync).

The way I see it selecting a device should imperatively trigger the device interaction. But this component is used this way everywhere else there is a device interaction on LLM.

Screen.Recording.2024-09-09.at.13.23.50.mov

❓ Context


🧐 Checklist for the PR Reviewers

  • The code aligns with the requirements described in the linked JIRA or GitHub issue.
  • The PR description clearly documents the changes made and explains any technical trade-offs or design decisions.
  • There are no undocumented trade-offs, technical debt, or maintainability issues.
  • The PR has been tested thoroughly, and any potential edge cases have been considered and handled.
  • Any new dependencies have been justified and documented.
  • Performance considerations have been taken into account. (changes have been profiled or benchmarked if necessary)

@thesan thesan requested a review from a team as a code owner September 9, 2024 11:53
Copy link

vercel bot commented Sep 9, 2024

The latest updates on your projects. Learn more about Vercel for Git β†—οΈŽ

5 Skipped Deployments
Name Status Preview Comments Updated (UTC)
ledger-live-docs ⬜️ Ignored (Inspect) Visit Preview Sep 10, 2024 9:08am
ledger-live-github-bot ⬜️ Ignored (Inspect) Visit Preview Sep 10, 2024 9:08am
native-ui-storybook ⬜️ Ignored (Inspect) Visit Preview Sep 10, 2024 9:08am
react-ui-storybook ⬜️ Ignored (Inspect) Visit Preview Sep 10, 2024 9:08am
web-tools ⬜️ Ignored (Inspect) Visit Preview Sep 10, 2024 9:08am

@live-github-bot live-github-bot bot added the mobile Has changes in LLM label Sep 9, 2024
@thesan thesan changed the title πŸ” [FIX]: Device selection after LedgerSync aborted flow fix: πŸ” device selection after aborted flow Sep 10, 2024
@thesan thesan merged commit 8649ebf into develop Sep 10, 2024
38 of 40 checks passed
@thesan thesan deleted the fix/llm-ls-device-choice branch September 10, 2024 10:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
mobile Has changes in LLM
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants