aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Finlay <flyswatter@users.noreply.github.com>2017-05-09 04:32:01 +0800
committerGitHub <noreply@github.com>2017-05-09 04:32:01 +0800
commit09a0e7ed89c25698161e1952e93160c99456f656 (patch)
treea30f7079fdfae74d746688bd30932884c9f3d7c3
parent86500d0bcbba5222d97e5882985a73234a928b71 (diff)
parent21b6a1b478032fa51505c1be517587515fe8bd6c (diff)
downloadtangerine-wallet-browser-09a0e7ed89c25698161e1952e93160c99456f656.tar
tangerine-wallet-browser-09a0e7ed89c25698161e1952e93160c99456f656.tar.gz
tangerine-wallet-browser-09a0e7ed89c25698161e1952e93160c99456f656.tar.bz2
tangerine-wallet-browser-09a0e7ed89c25698161e1952e93160c99456f656.tar.lz
tangerine-wallet-browser-09a0e7ed89c25698161e1952e93160c99456f656.tar.xz
tangerine-wallet-browser-09a0e7ed89c25698161e1952e93160c99456f656.tar.zst
tangerine-wallet-browser-09a0e7ed89c25698161e1952e93160c99456f656.zip
Merge pull request #1390 from MetaMask/ui-slim
Slim down the ui bundle a bit
-rw-r--r--app/scripts/popup-core.js5
-rw-r--r--package.json2
-rw-r--r--ui/app/actions.js2
-rw-r--r--ui/app/components/ens-input.js2
4 files changed, 6 insertions, 5 deletions
diff --git a/app/scripts/popup-core.js b/app/scripts/popup-core.js
index f9ac4d052..f1eb394d7 100644
--- a/app/scripts/popup-core.js
+++ b/app/scripts/popup-core.js
@@ -1,7 +1,7 @@
const EventEmitter = require('events').EventEmitter
const async = require('async')
const Dnode = require('dnode')
-const Web3 = require('web3')
+const EthQuery = require('eth-query')
const launchMetamaskUi = require('../../ui')
const StreamProvider = require('web3-stream-provider')
const setupMultiplex = require('./lib/stream-utils.js').setupMultiplex
@@ -32,7 +32,8 @@ function setupWeb3Connection (connectionStream) {
providerStream.pipe(connectionStream).pipe(providerStream)
connectionStream.on('error', console.error.bind(console))
providerStream.on('error', console.error.bind(console))
- global.web3 = new Web3(providerStream)
+ global.ethereumProvider = providerStream
+ global.ethQuery = new EthQuery(providerStream)
}
function setupControllerConnection (connectionStream, cb) {
diff --git a/package.json b/package.json
index ee7ba7aab..1ec784a69 100644
--- a/package.json
+++ b/package.json
@@ -61,7 +61,7 @@
"ensnare": "^1.0.0",
"eth-bin-to-ops": "^1.0.1",
"eth-hd-keyring": "^1.1.1",
- "eth-query": "^1.0.3",
+ "eth-query": "^2.1.1",
"eth-sig-util": "^1.1.1",
"eth-simple-keyring": "^1.1.1",
"ethereumjs-tx": "^1.3.0",
diff --git a/ui/app/actions.js b/ui/app/actions.js
index c15c9be7e..1a3557cb4 100644
--- a/ui/app/actions.js
+++ b/ui/app/actions.js
@@ -393,7 +393,7 @@ function signPersonalMsg (msgData) {
function signTx (txData) {
return (dispatch) => {
- web3.eth.sendTransaction(txData, (err, data) => {
+ global.ethQuery.sendTransaction(txData, (err, data) => {
dispatch(actions.hideLoadingIndication())
if (err) return dispatch(actions.displayWarning(err.message))
dispatch(actions.hideWarning())
diff --git a/ui/app/components/ens-input.js b/ui/app/components/ens-input.js
index f1cf49998..0457bde2e 100644
--- a/ui/app/components/ens-input.js
+++ b/ui/app/components/ens-input.js
@@ -75,7 +75,7 @@ EnsInput.prototype.componentDidMount = function () {
const resolverAddress = networkResolvers[network]
if (resolverAddress) {
- const provider = web3.currentProvider
+ const provider = global.ethereumProvider
this.ens = new ENS({ provider, network })
this.checkName = debounce(this.lookupEnsName.bind(this), 200)
}