Packaging issues related to Torus

Hey guys,

I think this is an internal moralis problem but I suppose its worth sharing.
Iā€™m getting this warning in my react app.

MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 accountChanged listeners added. Use emitter.setMaxListeners() to increase limit

this occurs when I use the onAccountChanged listener like so (as per documentation):

  const close = Moralis.onAccountChanged(() => {
    // do things
  });

Any thoughts on what might be causing this?

const close = Moralis.onAccountChanged(() => {
// do things
});

How are you using this in your React app? E.g. is it in a component. You are creating multiple listeners in some way instead of just one. You can post the rest of the outside code.