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: avoid potential race-condition in fuel connectors init #2930

Merged
merged 19 commits into from
Aug 23, 2024

Conversation

maschad
Copy link
Member

@maschad maschad commented Aug 13, 2024

Release notes

In this release, we:

  • Fixed a potential race condition where the fuel connector may disconnect upon re-render
  • Introduced an init method for synchronous instantiation of a fuel-connectors object

Summary

Checklist

  • All changes are covered by tests (or not applicable)
  • All changes are documented (or not applicable)
  • I reviewed the entire PR myself (preferably, on GH UI)
  • I described all Breaking Changes (or there's none)

@github-actions github-actions bot added the bug Issue is a bug label Aug 13, 2024
Copy link
Contributor

github-actions bot commented Aug 13, 2024

This PR is published in NPM with version 0.0.0-pr-2930-20240816221357

Co-authored-by: Nikita Chistousov <nikita_chistousov@epam.com>
@maschad maschad changed the base branch from release-v0.92.1 to master August 16, 2024 22:10
@maschad maschad changed the title fix: ensure that connectors wait for the default connector fix: avoid potential race-condition in fuel connectors init Aug 16, 2024
arboleya
arboleya previously approved these changes Aug 21, 2024
apps/docs-snippets/src/guide/wallets/connectors.test.ts Outdated Show resolved Hide resolved
Co-authored-by: Anderson Arboleya <anderson@arboleya.me>
@Torres-ssf
Copy link
Contributor

@LuizAsFight @helciofranco do the changes made here represent any breaking change into the useFuel React hook?

@maschad maschad enabled auto-merge (squash) August 23, 2024 14:09
Copy link
Contributor

Coverage Report:

Lines Branches Functions Statements
79.41%(-0.01%) 71.82%(+0.03%) 77.7%(-0.14%) 79.54%(-0.01%)
Changed Files:
Ok File (✨=New File) Lines Branches Functions Statements
🔴 packages/account/src/connectors/fuel.ts 95.39%
(-1.16%)
90.66%
(+1.33%)
88.88%
(-6.35%)
95.56%
(-1.12%)

@maschad maschad merged commit 3b59f1f into master Aug 23, 2024
27 of 36 checks passed
@maschad maschad deleted the mc/fix-flakey-connectors-on-re-render branch August 23, 2024 14:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue is a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Connector may arbitrary change on component re-render if several wallets are installed
6 participants