diff options
Merge branch 'master' into ConfirmationStyle
-rw-r--r-- | CHANGELOG.md | 2 | ||||
-rw-r--r-- | app/scripts/contentscript.js | 6 | ||||
-rw-r--r-- | app/scripts/inpage.js | 5 | ||||
-rw-r--r-- | ui/app/app.js | 6 | ||||
-rw-r--r-- | ui/app/util.js | 2 |
5 files changed, 12 insertions, 9 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index 8cb788a0d..54ac629e0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,8 @@ - Fix formatting of ETH balance - Fix formatting of account details. +- Use web3 minified dist for faster inject times +- Fix issue where dropdowns were not in front of icons. ## 2.5.0 2016-06-29 diff --git a/app/scripts/contentscript.js b/app/scripts/contentscript.js index f4f064163..60b37284e 100644 --- a/app/scripts/contentscript.js +++ b/app/scripts/contentscript.js @@ -1,14 +1,13 @@ const LocalMessageDuplexStream = require('./lib/local-message-stream.js') const PortStream = require('./lib/port-stream.js') const ObjectMultiplex = require('./lib/obj-multiplex') -// const urlUtil = require('url') if (shouldInjectWeb3()) { setupInjection() + setupStreams() } function setupInjection(){ - // inject in-page script var scriptTag = document.createElement('script') scriptTag.src = chrome.extension.getURL('scripts/inpage.js') @@ -16,6 +15,9 @@ function setupInjection(){ var container = document.head || document.documentElement // append as first child container.insertBefore(scriptTag, container.children[0]) +} + +function setupStreams(){ // setup communication to page and plugin var pageStream = new LocalMessageDuplexStream({ diff --git a/app/scripts/inpage.js b/app/scripts/inpage.js index e6f4078c8..f5e54cd7b 100644 --- a/app/scripts/inpage.js +++ b/app/scripts/inpage.js @@ -1,12 +1,11 @@ +/*global Web3*/ cleanContextForImports() -const Web3 = require('web3') +require('web3/dist/web3.min.js') const LocalMessageDuplexStream = require('./lib/local-message-stream.js') const setupDappAutoReload = require('./lib/auto-reload.js') const MetamaskInpageProvider = require('./lib/inpage-provider.js') restoreContextAfterImports() -// remove from window -delete window.Web3 // // setup plugin communication diff --git a/ui/app/app.js b/ui/app/app.js index dcc44ee65..4dd41d570 100644 --- a/ui/app/app.js +++ b/ui/app/app.js @@ -108,7 +108,7 @@ App.prototype.renderAppBar = function () { background: props.isUnlocked ? 'white' : 'none', height: '36px', position: 'relative', - zIndex: 1, + zIndex: 2, }, }, props.isUnlocked && [ @@ -197,10 +197,10 @@ App.prototype.renderNetworkDropdown = function () { onClickOutside: (event) => { this.setState({ isNetworkMenuOpen: !isOpen }) }, + zIndex: 1, style: { position: 'absolute', left: 0, - zIndex: 0, }, innerStyle: { background: 'white', @@ -245,13 +245,13 @@ App.prototype.renderDropdown = function () { return h(MenuDroppo, { isOpen: isOpen, + zIndex: 1, onClickOutside: (event) => { this.setState({ isMainMenuOpen: !isOpen }) }, style: { position: 'absolute', right: 0, - zIndex: 0, }, innerStyle: { background: 'white', diff --git a/ui/app/util.js b/ui/app/util.js index 1e92f0ea2..0a243387a 100644 --- a/ui/app/util.js +++ b/ui/app/util.js @@ -116,7 +116,7 @@ function formatBalance (balance, decimalsToKeep) { if (afterDecimal !== '0') { var sigFigs = afterDecimal.match(/^0*(.{2})/) // default: grabs 2 most significant digits if (sigFigs) { afterDecimal = sigFigs[0] } - formattedBalance = `0.${afterDecimal.slice(0, 6)}` + formattedBalance = afterDecimal.substr(0, 5) === '00000' ? '<0.00001' : `0.${afterDecimal.slice(0, 6)}` } } else { formattedBalance = `${beforeDecimal}.${afterDecimal.slice(0, 2)}` |