mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
Use stream-provider v3 api
This commit is contained in:
parent
c5432da567
commit
709c0eb307
@ -29,9 +29,9 @@ function connectToAccountManager (connectionStream, cb) {
|
|||||||
|
|
||||||
function setupWeb3Connection (connectionStream) {
|
function setupWeb3Connection (connectionStream) {
|
||||||
var providerStream = new StreamProvider()
|
var providerStream = new StreamProvider()
|
||||||
providerStream.pipe(connectionStream).pipe(providerStream)
|
providerStream.stream.pipe(connectionStream).pipe(providerStream.stream)
|
||||||
connectionStream.on('error', console.error.bind(console))
|
connectionStream.on('error', console.error.bind(console))
|
||||||
providerStream.on('error', console.error.bind(console))
|
providerStream.stream.on('error', console.error.bind(console))
|
||||||
global.ethereumProvider = providerStream
|
global.ethereumProvider = providerStream
|
||||||
global.ethQuery = new EthQuery(providerStream)
|
global.ethQuery = new EthQuery(providerStream)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user