browser-extension icon indicating copy to clipboard operation
browser-extension copied to clipboard

Events aren't being triggered?

Open arcticmatt opened this issue 4 years ago • 0 comments

I'm trying to listen for accountsChanged and clusterChanged, but those events don't appear to be fired.

Here's my code

window.solana.on("connect", () => {
  console.log("CONNECT");
});

window.solana.on("disconnect", () => {
  console.log("DISCONNECT");
});

window.solana.on("accountsChanged", () => {
  console.log("ACCOUNTS CHANGED");
});

window.solana.on("stateChanged", () => {
  console.log("STATE CHANGED");
});

window.solana.on("clusterChanged", () => {
  console.log("CLUSTER CHANGED");
});

connect and disconnect events are fine, but I'm not seeing the others.

arcticmatt avatar Nov 25 '21 21:11 arcticmatt