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

chore(walletsync): improve walletsync lib #7337

Merged
merged 1 commit into from
Jul 15, 2024

Conversation

gre
Copy link
Contributor

@gre gre commented Jul 15, 2024

βœ… Checklist

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

πŸ“ Description

this improve live-wallet/walletsync stack to allows a smooth integration in LLD. ( this code changes is extracted from #7300 )

  • createWalletSyncWatchLoop
    • differentiate the polling interval from the initial timeout. ultimately moving to just using setTimeout for both.
    • introduces onStartPolling which allows us to know when to set the last error (given by onError) back to null
    • introduces onUserRefreshIntent which is returned by the watch loop and allows the user to force a refresh. we debounce it with a setTimeout.
  • introduce walletStateExportShouldDiffer predicate to know if live-wallet store's export have changes
  • introduce wsStateSelector to access the WSState

❓ Context

  • JIRA or GitHub link: na

🧐 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)

@gre gre requested a review from a team as a code owner July 15, 2024 15:13
Copy link

vercel bot commented Jul 15, 2024

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

Name Status Preview Comments Updated (UTC)
web-tools βœ… Ready (Inspect) Visit Preview πŸ’¬ Add feedback Jul 15, 2024 3:13pm
4 Skipped Deployments
Name Status Preview Comments Updated (UTC)
ledger-live-docs ⬜️ Ignored (Inspect) Jul 15, 2024 3:13pm
ledger-live-github-bot ⬜️ Ignored (Inspect) Jul 15, 2024 3:13pm
native-ui-storybook ⬜️ Ignored (Inspect) Jul 15, 2024 3:13pm
react-ui-storybook ⬜️ Ignored (Inspect) Jul 15, 2024 3:13pm

@gre gre mentioned this pull request Jul 15, 2024
3 tasks
@gre gre merged commit b26ae51 into develop Jul 15, 2024
50 of 53 checks passed
@gre gre deleted the support/live-wallet-integration-evolutions branch July 15, 2024 15:45
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.

None yet

2 participants