Open Quicksaver opened 1 year ago
Can you try following:
const wallet = sequence.getWallet()
wallet.on('eventName', event => {
....
})
Ditto from https://github.com/0xsequence/sequence.js/issues/324#issuecomment-1425907022, 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.
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 achainChanged
event (or even the depcreatednetworkChanged
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?