1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-26 20:39:08 +01:00

inpage - correctly listen for incomming messages

This commit is contained in:
kumavis 2016-12-07 14:42:38 -08:00
parent 46bb9558d5
commit 26b60f1b5a

View File

@ -43,7 +43,7 @@ reloadStream.once('data', triggerReload)
var pingChannel = inpageProvider.multiStream.createStream('pingpong')
var pingStream = new PingStream({ objectMode: true })
// wait for first successful reponse
metamaskStream.once('_data', function(){
metamaskStream.once('data', function(){
pingStream.pipe(pingChannel).pipe(pingStream)
})
endOfStream(pingStream, triggerReload)