Skip to content

Events are not triggering #326

Description

@Quicksaver

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?

Activity

  1. tolgahan-arikan commented on Dec 2, 2022

    @tolgahan-arikan
    Contributor

    Can you try following:

    const wallet = sequence.getWallet()
    wallet.on('eventName', event => {
        ....
    })
    
  2. Quicksaver commented on Feb 10, 2023

    @Quicksaver
    Author

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions