From d59136eb49647a5a3217db828392d4743cb709d2 Mon Sep 17 00:00:00 2001 From: Thomas Date: Mon, 22 Jan 2018 16:06:35 -0800 Subject: [PATCH 1/5] Add ExtensionPlatform = 'development' to mockUi --- development/mockExtension.js | 5 +++++ mock-dev.js | 2 ++ 2 files changed, 7 insertions(+) diff --git a/development/mockExtension.js b/development/mockExtension.js index 55799b2bf..ac03d965c 100644 --- a/development/mockExtension.js +++ b/development/mockExtension.js @@ -37,3 +37,8 @@ apis.forEach(function (api) { extension.runtime.reload = noop extension.tabs.create = noop +extension.runtime.getManifest = function () { + return { + version: 'development' + } +} \ No newline at end of file diff --git a/mock-dev.js b/mock-dev.js index 0a3eb12ce..8827ddfdd 100644 --- a/mock-dev.js +++ b/mock-dev.js @@ -23,6 +23,7 @@ const states = require('./development/states') const Selector = require('./development/selector') const MetamaskController = require('./app/scripts/metamask-controller') const firstTimeState = require('./app/scripts/first-time-state') +const ExtensionPlatform = require('./app/scripts/platforms/extension') const extension = require('./development/mockExtension') const noop = function () {} @@ -67,6 +68,7 @@ const controller = new MetamaskController({ initState: firstTimeState, }) global.metamaskController = controller +global.platform = new ExtensionPlatform // // User Interface From baba179ccb1e456695c429cfbd5711dc0b4a620e Mon Sep 17 00:00:00 2001 From: Thomas Date: Mon, 22 Jan 2018 16:08:00 -0800 Subject: [PATCH 2/5] Remove duplicate eth-contract-metadata --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 0fd0f3a22..bf15acc3b 100644 --- a/package.json +++ b/package.json @@ -77,7 +77,6 @@ "eslint-plugin-react": "^7.4.0", "eth-bin-to-ops": "^1.0.1", "eth-block-tracker": "^2.3.0", - "eth-contract-metadata": "^1.1.4", "eth-json-rpc-filters": "^1.2.5", "eth-json-rpc-infura": "^2.0.7", "eth-keyring-controller": "^2.1.4", @@ -188,6 +187,7 @@ "brfs": "^1.4.3", "browserify": "^14.4.0", "chai": "^4.1.0", + "compression": "^1.7.1", "coveralls": "^3.0.0", "deep-freeze-strict": "^1.1.1", "del": "^3.0.0", From ce0de5feed223a1c02b3b76dfff3f4c3fd392734 Mon Sep 17 00:00:00 2001 From: Thomas Date: Mon, 22 Jan 2018 16:09:23 -0800 Subject: [PATCH 3/5] String interpolate version in settings --- ui/app/settings.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/app/settings.js b/ui/app/settings.js index 4e25ce084..476bad296 100644 --- a/ui/app/settings.js +++ b/ui/app/settings.js @@ -342,7 +342,7 @@ class Settings extends Component { this.renderLogo(), h('div.settings__info-item', [ h('div.settings__info-version-header', 'MetaMask Version'), - h('div.settings__info-version-number', version), + h('div.settings__info-version-number', `${version}`), ]), h('div.settings__info-item', [ h( From b62ec394f55b7bf3209cf5e1dc4721648dfc15dc Mon Sep 17 00:00:00 2001 From: Thomas Date: Mon, 22 Jan 2018 16:10:07 -0800 Subject: [PATCH 4/5] Revert integration to oldUi --- test/integration/lib/first-time.js | 41 +++++++++++++++++------------- 1 file changed, 23 insertions(+), 18 deletions(-) diff --git a/test/integration/lib/first-time.js b/test/integration/lib/first-time.js index e59897713..06325ab98 100644 --- a/test/integration/lib/first-time.js +++ b/test/integration/lib/first-time.js @@ -39,9 +39,8 @@ async function runFirstTimeUsageTest(assert, done) { await timeout() // Scroll through terms - const title = app.find('h1').text() - // TODO Find where Metamask is getting added twice in the title - assert.equal(title, 'MetaMaskMetaMask', 'title screen') + const title = app.find('h1')[1] + assert.equal(title.textContent, 'MetaMask', 'title screen') // enter password const pwBox = app.find('#password-box')[0] @@ -67,19 +66,19 @@ async function runFirstTimeUsageTest(assert, done) { await timeout(1000) - const detail = app.find('.wallet-view')[0] + const detail = app.find('.account-detail-section')[0] assert.ok(detail, 'Account detail section loaded.') - await timeout(1000) + const sandwich = app.find('.sandwich-expando')[0] + sandwich.click() - const menu = app.find('.account-menu__icon')[0] - menu.click() + await timeout() - await timeout(1000) - - const lock = app.find('.account-menu__logout-button')[0] - assert.ok(lock, 'Lock menu item found') - lock.click() + const menu = app.find('.menu-droppo')[0] + const children = menu.children + const logout = children[2] + assert.ok(logout, 'Lock menu item found') + logout.click() await timeout(1000) @@ -91,30 +90,36 @@ async function runFirstTimeUsageTest(assert, done) { await timeout(1000) - const detail2 = app.find('.wallet-view')[0] + const detail2 = app.find('.account-detail-section')[0] assert.ok(detail2, 'Account detail section loaded again.') await timeout() // open account settings dropdown - const qrButton = app.find('.wallet-view__details-button')[0] + const qrButton = app.find('.fa.fa-ellipsis-h')[0] qrButton.click() await timeout(1000) - const qrHeader = app.find('.editable-label__value')[0] - const qrContainer = app.find('.qr-wrapper')[0] + // qr code item + const qrButton2 = app.find('.dropdown-menu-item')[1] + qrButton2.click() + + await timeout(1000) + + const qrHeader = app.find('.qr-header')[0] + const qrContainer = app.find('#qr-container')[0] assert.equal(qrHeader.textContent, 'Account 1', 'Should show account label.') assert.ok(qrContainer, 'QR Container found') await timeout() - const networkMenu = app.find('.network-component')[0] + const networkMenu = app.find('.network-indicator')[0] networkMenu.click() await timeout() - const networkMenu2 = app.find('.menu-droppo')[0] + const networkMenu2 = app.find('.network-indicator')[0] const children2 = networkMenu2.children children2.length[3] assert.ok(children2, 'All network options present') From 97ca86733cb49750a9909b57ac1f31bc0f49abc5 Mon Sep 17 00:00:00 2001 From: Thomas Date: Tue, 23 Jan 2018 01:12:50 -0800 Subject: [PATCH 5/5] Merge branch 'master' into uat --- CHANGELOG.md | 10 ++++++++++ app/manifest.json | 2 +- app/scripts/background.js | 12 +++++++++++- app/scripts/setupRaven.js | 2 ++ old-ui/app/components/loading.js | 12 +++++++++++- old-ui/app/conf-tx.js | 6 +++++- package.json | 6 +++--- 7 files changed, 43 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e5f85dbb2..905f1f98f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,16 @@ ## Current Master +## 3.13.7 2018-1-22 + +- Add ability to bypass gas estimation loading indicator. +- Forward failed transactions to Sentry error reporting service +- Re-add changes from 3.13.5 + +## 3.13.6 2017-1-18 + +- Roll back changes to 3.13.4 to fix some issues with the new Infura REST provider. + ## 3.13.5 2018-1-16 - Estimating gas limit for simple ether sends now faster & cheaper, by avoiding VM usage on recipients with no code. diff --git a/app/manifest.json b/app/manifest.json index d906382e9..d795a225a 100644 --- a/app/manifest.json +++ b/app/manifest.json @@ -1,7 +1,7 @@ { "name": "MetaMask", "short_name": "Metamask", - "version": "4.0.10", + "version": "3.13.7", "manifest_version": 2, "author": "https://metamask.io", "description": "Ethereum Browser Extension", diff --git a/app/scripts/background.js b/app/scripts/background.js index 8c1252d3e..0471cee3b 100644 --- a/app/scripts/background.js +++ b/app/scripts/background.js @@ -27,7 +27,7 @@ global.METAMASK_NOTIFIER = notificationManager // setup sentry error reporting const release = platform.getVersion() -setupRaven({ release }) +const raven = setupRaven({ release }) let popupIsOpen = false @@ -77,6 +77,16 @@ function setupController (initState) { }) global.metamaskController = controller + // report failed transactions to Sentry + controller.txController.on(`tx:status-update`, (txId, status) => { + if (status !== 'failed') return + const txMeta = controller.txController.txStateManager.getTx(txId) + raven.captureMessage('Transaction Failed', { + // "extra" key is required by Sentry + extra: txMeta, + }) + }) + // setup state persistence pump( asStream(controller.store), diff --git a/app/scripts/setupRaven.js b/app/scripts/setupRaven.js index 4888c85fe..7beffeff9 100644 --- a/app/scripts/setupRaven.js +++ b/app/scripts/setupRaven.js @@ -21,4 +21,6 @@ function setupRaven(opts) { Raven.config(ravenTarget, { release, }).install() + + return Raven } diff --git a/old-ui/app/components/loading.js b/old-ui/app/components/loading.js index 163792584..b8e2eb599 100644 --- a/old-ui/app/components/loading.js +++ b/old-ui/app/components/loading.js @@ -11,7 +11,7 @@ function LoadingIndicator () { } LoadingIndicator.prototype.render = function () { - const { isLoading, loadingMessage } = this.props + const { isLoading, loadingMessage, canBypass, bypass } = this.props return ( isLoading ? h('.full-flex-height', { @@ -28,6 +28,16 @@ LoadingIndicator.prototype.render = function () { background: 'rgba(255, 255, 255, 0.8)', }, }, [ + canBypass ? h( 'i.fa.fa-close.cursor-pointer.close-loading', { + style: { + position: 'absolute', + top: '1px', + right: '15px', + color: '#AEAEAE', + }, + onClick: bypass, + }) : null, + h('img', { src: 'images/loading.svg', }), diff --git a/old-ui/app/conf-tx.js b/old-ui/app/conf-tx.js index 5e2ae9e78..1bb8eb97c 100644 --- a/old-ui/app/conf-tx.js +++ b/old-ui/app/conf-tx.js @@ -62,8 +62,12 @@ ConfirmTxScreen.prototype.render = function () { h('.flex-column.flex-grow', [ h(LoadingIndicator, { - isLoading: txData.loadingDefaults, + isLoading: this.state ? !this.state.bypassLoadingScreen : txData.loadingDefaults, loadingMessage: 'Estimating transaction cost…', + canBypass: true, + bypass: () => { + this.setState({bypassLoadingScreen: true}) + }, }), // subtitle and nav diff --git a/package.json b/package.json index bf15acc3b..bbecb1f40 100644 --- a/package.json +++ b/package.json @@ -78,7 +78,7 @@ "eth-bin-to-ops": "^1.0.1", "eth-block-tracker": "^2.3.0", "eth-json-rpc-filters": "^1.2.5", - "eth-json-rpc-infura": "^2.0.7", + "eth-json-rpc-infura": "^2.0.11", "eth-keyring-controller": "^2.1.4", "eth-contract-metadata": "^1.1.5", "eth-hd-keyring": "^1.2.1", @@ -113,7 +113,7 @@ "iframe-stream": "^3.0.0", "inject-css": "^0.1.1", "jazzicon": "^1.2.0", - "json-rpc-engine": "^3.5.0", + "json-rpc-engine": "^3.6.1", "json-rpc-middleware-stream": "^1.0.1", "lodash.debounce": "^4.0.8", "lodash.memoize": "^4.1.2", @@ -169,7 +169,7 @@ "valid-url": "^1.0.9", "vreme": "^3.0.2", "web3": "^0.20.1", - "web3-provider-engine": "^13.5.0", + "web3-provider-engine": "^13.5.6", "web3-stream-provider": "^3.0.1", "xtend": "^4.0.1" },