mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
popup.js - set web3 on global
This commit is contained in:
parent
f64e4a518b
commit
18c4f18c71
@ -3,6 +3,7 @@ const EventEmitter = require('events').EventEmitter
|
||||
const async = require('async')
|
||||
const Multiplex = require('multiplex')
|
||||
const Dnode = require('dnode')
|
||||
const Web3 = require('web3')
|
||||
const MetaMaskUi = require('metamask-ui')
|
||||
const MetaMaskUiCss = require('metamask-ui/css')
|
||||
const injectCss = require('inject-css')
|
||||
@ -44,6 +45,7 @@ function linkWeb3(stream){
|
||||
remoteProvider.pipe(stream).pipe(remoteProvider)
|
||||
stream.on('error', console.error.bind(console))
|
||||
remoteProvider.on('error', console.error.bind(console))
|
||||
global.web3 = new Web3(remoteProvider)
|
||||
}
|
||||
|
||||
function linkDnode(stream, cb){
|
||||
|
Loading…
Reference in New Issue
Block a user