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

Ledger Sync - Fix side effect causing the synchronization to stop working #7929

Merged

Conversation

cgrellard-ledger
Copy link
Contributor

@cgrellard-ledger cgrellard-ledger commented Sep 26, 2024

βœ… Checklist

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

πŸ“ Description

This PR fixes an issue that caused the synchronization to be broken for an instance in the following situation :
When the local wallet sync state version was different than the one returned by the cloud sync api (when pushing or pulling data) and the resolveIncrementalUpdate function didn't detect any changes between the latestState and the distantState, the local version wasn't updated and all subsequent call to the cloud sync api were returning an out of sync state.
This is fixed by updating the local version to the value returned by the cloud sync api even if there were no differences between the latest data and the distant data. That way the following calls made to pull data from the cloud sync api will be successfull and the synchronization will keep working.

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

@cgrellard-ledger cgrellard-ledger requested a review from a team as a code owner September 26, 2024 16:47
Copy link

vercel bot commented Sep 26, 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 Oct 1, 2024 8:30am
4 Skipped Deployments
Name Status Preview Comments Updated (UTC)
ledger-live-docs ⬜️ Ignored (Inspect) Visit Preview Oct 1, 2024 8:30am
ledger-live-github-bot ⬜️ Ignored (Inspect) Visit Preview Oct 1, 2024 8:30am
native-ui-storybook ⬜️ Ignored (Inspect) Visit Preview Oct 1, 2024 8:30am
react-ui-storybook ⬜️ Ignored (Inspect) Visit Preview Oct 1, 2024 8:30am

@live-github-bot live-github-bot bot added desktop Has changes in LLD mobile Has changes in LLM labels Sep 26, 2024
@cgrellard-ledger cgrellard-ledger merged commit 92df3b4 into develop Oct 1, 2024
55 checks passed
@cgrellard-ledger cgrellard-ledger deleted the bugfix/ledger-sync-synchronization-not-working branch October 1, 2024 09:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
desktop Has changes in LLD mobile Has changes in LLM
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants