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

Events are not triggering #326

Open
Quicksaver opened this issue Nov 25, 2022 · 2 comments
Open

Events are not triggering #326

Quicksaver opened this issue Nov 25, 2022 · 2 comments

Comments

@Quicksaver
Copy link

Listening to events (https://docs.metamask.io/guide/ethereum-provider.html#events), via sequenceProvider.transport.provider.on(eventName, eventHandler) does not seem to work.

For example, sending a successful wallet_switchEthereumChain request to the web3 provider object does not trigger a chainChanged event (or even the depcreated networkChanged one).

If I disconnect (sign out) of the sequence wallet, I also don't get a disconnected event, although I'm not sure that's by design as the client in the page may still be connected?

@tolgahan-arikan
Copy link
Contributor

Can you try following:

const wallet = sequence.getWallet()
wallet.on('eventName', event => {
    ....
})

@Quicksaver
Copy link
Author

Quicksaver commented Feb 10, 2023

Ditto from #324 (comment), we've had to rewrite our code to not follow blindly web3js events and be able to listen from other sources, aka Sequence's methods. Could be a blocker for projects looking to integrate Sequence into their already existing ethers/web3js-compatible code.

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

No branches or pull requests

2 participants