Skip to content

fix: Fix broken wallet_sessionChanged listener when using underlying multichain-api-client's WindowPostMessageTransport#204

Open
jiexi wants to merge 3 commits intomainfrom
jl/fix-default-transport-broken-multichain-listener
Open

fix: Fix broken wallet_sessionChanged listener when using underlying multichain-api-client's WindowPostMessageTransport#204
jiexi wants to merge 3 commits intomainfrom
jl/fix-default-transport-broken-multichain-listener

Conversation

@jiexi
Copy link
Member

@jiexi jiexi commented Mar 10, 2026

Explanation

Fixes wallet_sessionChanged events not making it to the MultichainClient from the DefaultTransport because the underlying WindowPostMessageTransport has removed any event listeners when connect() is called on it and it is already connected. Should it be doing that, i'm not sure.

The workaround for now is to check if we are connected or not in the (multichain-api-client) transport used by the (our) DefaultTransport (not a good name...) before attempting to call connect() again.

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

@jiexi jiexi requested a review from a team as a code owner March 10, 2026 23:49
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.

1 participant