aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkumavis <aaron@kumavis.me>2016-03-11 04:30:44 +0800
committerkumavis <aaron@kumavis.me>2016-03-11 04:30:44 +0800
commit18c4f18c71d479038bf11f34edf3e6899246724b (patch)
tree263f913f55f060e7d1a53a7b4e1247b6b4c898e5
parentf64e4a518b1c692a2be0dea0391aaa34f5b0756b (diff)
downloadtangerine-wallet-browser-18c4f18c71d479038bf11f34edf3e6899246724b.tar
tangerine-wallet-browser-18c4f18c71d479038bf11f34edf3e6899246724b.tar.gz
tangerine-wallet-browser-18c4f18c71d479038bf11f34edf3e6899246724b.tar.bz2
tangerine-wallet-browser-18c4f18c71d479038bf11f34edf3e6899246724b.tar.lz
tangerine-wallet-browser-18c4f18c71d479038bf11f34edf3e6899246724b.tar.xz
tangerine-wallet-browser-18c4f18c71d479038bf11f34edf3e6899246724b.tar.zst
tangerine-wallet-browser-18c4f18c71d479038bf11f34edf3e6899246724b.zip
popup.js - set web3 on global
-rw-r--r--app/scripts/popup.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/app/scripts/popup.js b/app/scripts/popup.js
index 0110f81b6..cfb3c95e0 100644
--- a/app/scripts/popup.js
+++ b/app/scripts/popup.js
@@ -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){