Skip to content

Conversation

@adonesky1
Copy link
Contributor

@adonesky1 adonesky1 commented Dec 4, 2025

Explanation

Adds an eager call of onChainChanged on connect-evm layer when a switchChain call is successful in order to ensure that the provider's selectedChainId is updated even if the subsequent chainChanged event notification is not received for some reason.

References

Checklist

  • I've updated the test suite for new or updated code as appropriate
  • I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate
  • I've communicated my changes to consumers by updating changelogs for packages I've changed, highlighting breaking changes as necessary
  • I've prepared draft pull requests for clients and consumer packages to resolve any breaking changes

… from switchChain calls rather than wait for chainChanged event
@adonesky1 adonesky1 requested a review from a team as a code owner December 4, 2025 19:32
@adonesky1 adonesky1 changed the title eagerly emit chainChanged events when receiving a successful response from switchChain calls rather than wait for chainChanged event fix: eagerly emit chainChanged events when receiving a successful response from switchChain calls rather than wait for chainChanged event Dec 4, 2025
jiexi
jiexi previously approved these changes Dec 4, 2025
@jiexi jiexi merged commit 4ef28cc into main Dec 4, 2025
40 checks passed
@jiexi jiexi deleted the ad/eager-onchainchanged branch December 4, 2025 20:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants