Closed haustraliaer closed 10 years ago
Found a way to reproduce this, and have a thought on a fix
As you can see from my console, the wallet-opening
event is being bound over and over again. We need to unbind this event when the view changes (not sure how to do this in ractive)
FYI I monkey-patched the emitter to give me some hints
var Emitter = require('events').EventEmitter
var emitter = new Emitter()
emitter._off = emitter.off
emitter._on = emitter.on
emitter.on = function() {
console.log('Bound', arguments)
this._on.apply(this, arguments)
}
emitter.off = function() {
console.log('Unbound', arguments)
this._off.apply(this, arguments)
}
module.exports = emitter
While clicking around the auth section (more than necessary as I was testing button states) I came across this odd error in the console:
(node) warning: possible EventEmitter memory leak detected. 11 listeners added. Use emitter.setMaxListeners() to increase limit.
Cannot reproduce :/