aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG.md12
-rw-r--r--app/manifest.json2
-rw-r--r--app/scripts/background.js10
-rw-r--r--app/scripts/lib/reportFailedTxToSentry.js38
-rw-r--r--app/scripts/lib/setupRaven.js (renamed from app/scripts/setupRaven.js)2
-rw-r--r--app/scripts/popup.js2
-rw-r--r--mascara/src/app/first-time/create-password-screen.js1
-rw-r--r--mascara/src/app/first-time/index.css9
-rw-r--r--old-ui/app/components/account-dropdowns.js2
-rw-r--r--old-ui/app/components/coinbase-form.js2
-rw-r--r--old-ui/app/components/network.js20
-rw-r--r--old-ui/app/components/transaction-list-item.js2
-rw-r--r--ui/app/add-token.js2
-rw-r--r--ui/app/app.js8
-rw-r--r--ui/app/components/account-dropdowns.js2
-rw-r--r--ui/app/components/dropdowns/components/account-dropdowns.js2
-rw-r--r--ui/app/components/transaction-list-item.js2
-rw-r--r--ui/app/components/tx-list-item.js2
-rw-r--r--ui/app/css/itcss/components/header.scss15
-rw-r--r--ui/app/css/itcss/components/newui-sections.scss24
20 files changed, 130 insertions, 29 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index abc89f9c7..59f116aed 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,6 +2,18 @@
## Current Master
+## 4.1.2 2018-2-28
+
+- Actually includes all the fixes mentioned in 4.1.1 (sorry)
+
+## 4.1.1 2018-2-28
+
+- Fix "Add Token" screen referencing missing token logo urls
+- Prevent user from switching network during signature request
+- Fix misleading language "Contract Published" -> "Contract Deployment"
+- Fix cancel button on "Buy Eth" screen
+- Improve new-ui onboarding flow style
+
## 4.1.0 2018-2-27
- Report failed txs to Sentry with more specific message
diff --git a/app/manifest.json b/app/manifest.json
index eab6c7063..1c9c420f9 100644
--- a/app/manifest.json
+++ b/app/manifest.json
@@ -1,7 +1,7 @@
{
"name": "MetaMask",
"short_name": "Metamask",
- "version": "4.1.0",
+ "version": "4.1.2",
"manifest_version": 2,
"author": "https://metamask.io",
"description": "Ethereum Browser Extension",
diff --git a/app/scripts/background.js b/app/scripts/background.js
index 476d073d1..4487ff318 100644
--- a/app/scripts/background.js
+++ b/app/scripts/background.js
@@ -13,9 +13,11 @@ const PortStream = require('./lib/port-stream.js')
const NotificationManager = require('./lib/notification-manager.js')
const MetamaskController = require('./metamask-controller')
const firstTimeState = require('./first-time-state')
-const setupRaven = require('./setupRaven')
+const setupRaven = require('./lib/setupRaven')
+const reportFailedTxToSentry = require('./lib/reportFailedTxToSentry')
const setupMetamaskMeshMetrics = require('./lib/setupMetamaskMeshMetrics')
+
const STORAGE_KEY = 'metamask-config'
const METAMASK_DEBUG = 'GULP_METAMASK_DEBUG'
@@ -86,11 +88,7 @@ function setupController (initState) {
controller.txController.on(`tx:status-update`, (txId, status) => {
if (status !== 'failed') return
const txMeta = controller.txController.txStateManager.getTx(txId)
- const errorMessage = `Transaction Failed: ${txMeta.err.message}`
- raven.captureMessage(errorMessage, {
- // "extra" key is required by Sentry
- extra: txMeta,
- })
+ reportFailedTxToSentry({ raven, txMeta })
})
// setup state persistence
diff --git a/app/scripts/lib/reportFailedTxToSentry.js b/app/scripts/lib/reportFailedTxToSentry.js
new file mode 100644
index 000000000..ee73f6845
--- /dev/null
+++ b/app/scripts/lib/reportFailedTxToSentry.js
@@ -0,0 +1,38 @@
+const ethJsRpcSlug = 'Error: [ethjs-rpc] rpc error with payload '
+const errorLabelPrefix = 'Error: '
+
+module.exports = reportFailedTxToSentry
+
+//
+// utility for formatting failed transaction messages
+// for sending to sentry
+//
+
+function reportFailedTxToSentry({ raven, txMeta }) {
+ const errorMessage = extractErrorMessage(txMeta.err.message)
+ raven.captureMessage(errorMessage, {
+ // "extra" key is required by Sentry
+ extra: txMeta,
+ })
+}
+
+//
+// ethjs-rpc provides overly verbose error messages
+// if we detect this type of message, we extract the important part
+// Below is an example input and output
+//
+// Error: [ethjs-rpc] rpc error with payload {"id":3947817945380,"jsonrpc":"2.0","params":["0xf8eb8208708477359400830398539406012c8cf97bead5deae237070f9587f8e7a266d80b8843d7d3f5a0000000000000000000000000000000000000000000000000000000000081d1a000000000000000000000000000000000000000000000000001ff973cafa800000000000000000000000000000000000000000000000000000038d7ea4c68000000000000000000000000000000000000000000000000000000000000003f48025a04c32a9b630e0d9e7ff361562d850c86b7a884908135956a7e4a336fa0300d19ca06830776423f25218e8d19b267161db526e66895567147015b1f3fc47aef9a3c7"],"method":"eth_sendRawTransaction"} Error: replacement transaction underpriced
+//
+// Transaction Failed: replacement transaction underpriced
+//
+
+function extractErrorMessage(errorMessage) {
+ const isEthjsRpcError = errorMessage.includes(ethJsRpcSlug)
+ if (isEthjsRpcError) {
+ const payloadAndError = errorMessage.slice(ethJsRpcSlug.length)
+ const originalError = payloadAndError.slice(payloadAndError.indexOf(errorLabelPrefix) + errorLabelPrefix.length)
+ return `Transaction Failed: ${originalError}`
+ } else {
+ return `Transaction Failed: ${errorMessage}`
+ }
+}
diff --git a/app/scripts/setupRaven.js b/app/scripts/lib/setupRaven.js
index 7beffeff9..42e48cb90 100644
--- a/app/scripts/setupRaven.js
+++ b/app/scripts/lib/setupRaven.js
@@ -1,4 +1,4 @@
-const Raven = require('./vendor/raven.min.js')
+const Raven = require('../vendor/raven.min.js')
const METAMASK_DEBUG = 'GULP_METAMASK_DEBUG'
const PROD = 'https://3567c198f8a8412082d32655da2961d0@sentry.io/273505'
const DEV = 'https://f59f3dd640d2429d9d0e2445a87ea8e1@sentry.io/273496'
diff --git a/app/scripts/popup.js b/app/scripts/popup.js
index 53ab00e00..11d50ee87 100644
--- a/app/scripts/popup.js
+++ b/app/scripts/popup.js
@@ -8,7 +8,7 @@ const extension = require('extensionizer')
const ExtensionPlatform = require('./platforms/extension')
const NotificationManager = require('./lib/notification-manager')
const notificationManager = new NotificationManager()
-const setupRaven = require('./setupRaven')
+const setupRaven = require('./lib/setupRaven')
// create platform global
global.platform = new ExtensionPlatform()
diff --git a/mascara/src/app/first-time/create-password-screen.js b/mascara/src/app/first-time/create-password-screen.js
index d1a2ec70f..450d6a479 100644
--- a/mascara/src/app/first-time/create-password-screen.js
+++ b/mascara/src/app/first-time/create-password-screen.js
@@ -59,7 +59,6 @@ class CreatePasswordScreen extends Component {
? <LoadingScreen loadingMessage="Creating your new account" />
: (
<div>
- <h2 className="alpha-warning">Warning: This is Experimental software and is a Developer BETA</h2>
<div className="first-view-main">
<div className="mascara-info">
<Mascot
diff --git a/mascara/src/app/first-time/index.css b/mascara/src/app/first-time/index.css
index 4314efbe6..109946e1d 100644
--- a/mascara/src/app/first-time/index.css
+++ b/mascara/src/app/first-time/index.css
@@ -4,13 +4,15 @@
width: 100vw;
background-color: #FFF;
overflow: auto;
+ display: flex;
+ justify-content: center;
}
.alpha-warning {
background: #f7861c;
color: #fff;
line-height: 2em;
- padding-left: 2em;
+ padding-left: 10vw;
}
.first-view-main {
@@ -23,7 +25,6 @@
display: flex;
flex-flow: column;
margin-top: 70px;
- margin-right: 10vw;
width: 35vw;
max-width: 550px;
}
@@ -48,6 +49,10 @@
max-width: 35rem;
}
+.create-password {
+ margin: 67px 0 50px 0px;
+}
+
.import-account {
max-width: initial;
}
diff --git a/old-ui/app/components/account-dropdowns.js b/old-ui/app/components/account-dropdowns.js
index aa7a3ad67..7a2357921 100644
--- a/old-ui/app/components/account-dropdowns.js
+++ b/old-ui/app/components/account-dropdowns.js
@@ -173,7 +173,7 @@ class AccountDropdowns extends Component {
minWidth: '180px',
},
isOpen: optionsMenuActive,
- onClickOutside: () => {
+ onClickOutside: (event) => {
const { classList } = event.target
const isNotToggleElement = !classList.contains(this.optionsMenuToggleClassName)
if (optionsMenuActive && isNotToggleElement) {
diff --git a/old-ui/app/components/coinbase-form.js b/old-ui/app/components/coinbase-form.js
index 35b2111ff..1a1b77b50 100644
--- a/old-ui/app/components/coinbase-form.js
+++ b/old-ui/app/components/coinbase-form.js
@@ -40,7 +40,7 @@ CoinbaseForm.prototype.render = function () {
}, 'Continue to Coinbase'),
h('button.btn-red', {
- onClick: () => props.dispatch(actions.backTobuyView(props.accounts.address)),
+ onClick: () => props.dispatch(actions.goHome()),
}, 'Cancel'),
]),
])
diff --git a/old-ui/app/components/network.js b/old-ui/app/components/network.js
index 0dbe37cdd..59596dabd 100644
--- a/old-ui/app/components/network.js
+++ b/old-ui/app/components/network.js
@@ -23,14 +23,15 @@ Network.prototype.render = function () {
if (networkNumber === 'loading') {
return h('span.pointer', {
+ className: props.onClick && 'pointer',
style: {
display: 'flex',
alignItems: 'center',
flexDirection: 'row',
},
- onClick: (event) => this.props.onClick(event),
+ onClick: (event) => props.onClick && props.onClick(event),
}, [
- h('img', {
+ props.onClick && h('img', {
title: 'Attempting to connect to blockchain.',
style: {
width: '27px',
@@ -60,9 +61,10 @@ Network.prototype.render = function () {
}
return (
- h('#network_component.pointer', {
+ h('#network_component', {
+ className: props.onClick && 'pointer',
title: hoverText,
- onClick: (event) => this.props.onClick(event),
+ onClick: (event) => props.onClick && props.onClick(event),
}, [
(function () {
switch (iconName) {
@@ -74,7 +76,7 @@ Network.prototype.render = function () {
color: '#039396',
}},
'Main Network'),
- h('i.fa.fa-caret-down.fa-lg'),
+ props.onClick && h('i.fa.fa-caret-down.fa-lg'),
])
case 'ropsten-test-network':
return h('.network-indicator', [
@@ -84,7 +86,7 @@ Network.prototype.render = function () {
color: '#ff6666',
}},
'Ropsten Test Net'),
- h('i.fa.fa-caret-down.fa-lg'),
+ props.onClick && h('i.fa.fa-caret-down.fa-lg'),
])
case 'kovan-test-network':
return h('.network-indicator', [
@@ -94,7 +96,7 @@ Network.prototype.render = function () {
color: '#690496',
}},
'Kovan Test Net'),
- h('i.fa.fa-caret-down.fa-lg'),
+ props.onClick && h('i.fa.fa-caret-down.fa-lg'),
])
case 'rinkeby-test-network':
return h('.network-indicator', [
@@ -104,7 +106,7 @@ Network.prototype.render = function () {
color: '#e7a218',
}},
'Rinkeby Test Net'),
- h('i.fa.fa-caret-down.fa-lg'),
+ props.onClick && h('i.fa.fa-caret-down.fa-lg'),
])
default:
return h('.network-indicator', [
@@ -120,7 +122,7 @@ Network.prototype.render = function () {
color: '#AEAEAE',
}},
'Private Network'),
- h('i.fa.fa-caret-down.fa-lg'),
+ props.onClick && h('i.fa.fa-caret-down.fa-lg'),
])
}
})(),
diff --git a/old-ui/app/components/transaction-list-item.js b/old-ui/app/components/transaction-list-item.js
index 76a456d3f..95670bd54 100644
--- a/old-ui/app/components/transaction-list-item.js
+++ b/old-ui/app/components/transaction-list-item.js
@@ -123,7 +123,7 @@ function recipientField (txParams, transaction, isTx, isMsg) {
} else if (txParams.to) {
message = addressSummary(txParams.to)
} else {
- message = 'Contract Published'
+ message = 'Contract Deployment'
}
return h('div', {
diff --git a/ui/app/add-token.js b/ui/app/add-token.js
index 3a806d34b..230ab35fe 100644
--- a/ui/app/add-token.js
+++ b/ui/app/add-token.js
@@ -240,7 +240,7 @@ AddTokenScreen.prototype.renderTokenList = function () {
}, [
h('div.add-token__token-icon', {
style: {
- backgroundImage: `url(images/contract/${logo})`,
+ backgroundImage: logo && `url(images/contract/${logo})`,
},
}),
h('div.add-token__token-data', [
diff --git a/ui/app/app.js b/ui/app/app.js
index 58e38a077..5d37b9bdf 100644
--- a/ui/app/app.js
+++ b/ui/app/app.js
@@ -239,6 +239,9 @@ App.prototype.renderAppBar = function () {
showNetworkDropdown,
hideNetworkDropdown,
currentView,
+ isInitialized,
+ betaUI,
+ isPopup,
} = this.props
if (window.METAMASK_UI_TYPE === 'notification') {
@@ -285,6 +288,8 @@ App.prototype.renderAppBar = function () {
// metamask name
h('h1', 'MetaMask'),
+ h('div.beta-label', 'BETA'),
+
]),
h('div.header__right-actions', [
@@ -317,6 +322,9 @@ App.prototype.renderAppBar = function () {
]),
]),
+ !isInitialized && !isPopup && betaUI && h('h2.alpha-warning',
+ 'Please be aware that this version is still under development'),
+
])
)
}
diff --git a/ui/app/components/account-dropdowns.js b/ui/app/components/account-dropdowns.js
index f69a6ca68..1cd7a0847 100644
--- a/ui/app/components/account-dropdowns.js
+++ b/ui/app/components/account-dropdowns.js
@@ -173,7 +173,7 @@ class AccountDropdowns extends Component {
minWidth: '180px',
},
isOpen: optionsMenuActive,
- onClickOutside: () => {
+ onClickOutside: (event) => {
const { classList } = event.target
const isNotToggleElement = !classList.contains(this.optionsMenuToggleClassName)
if (optionsMenuActive && isNotToggleElement) {
diff --git a/ui/app/components/dropdowns/components/account-dropdowns.js b/ui/app/components/dropdowns/components/account-dropdowns.js
index d3a549884..fa9ffc632 100644
--- a/ui/app/components/dropdowns/components/account-dropdowns.js
+++ b/ui/app/components/dropdowns/components/account-dropdowns.js
@@ -281,7 +281,7 @@ class AccountDropdowns extends Component {
dropdownWrapperStyle,
),
isOpen: optionsMenuActive,
- onClickOutside: () => {
+ onClickOutside: (event) => {
const { classList } = event.target
const isNotToggleElement = !classList.contains(this.optionsMenuToggleClassName)
if (optionsMenuActive && isNotToggleElement) {
diff --git a/ui/app/components/transaction-list-item.js b/ui/app/components/transaction-list-item.js
index 4e3d2cb93..a45cd441a 100644
--- a/ui/app/components/transaction-list-item.js
+++ b/ui/app/components/transaction-list-item.js
@@ -180,7 +180,7 @@ function recipientField (txParams, transaction, isTx, isMsg) {
} else if (txParams.to) {
message = addressSummary(txParams.to)
} else {
- message = 'Contract Published'
+ message = 'Contract Deployment'
}
return h('div', {
diff --git a/ui/app/components/tx-list-item.js b/ui/app/components/tx-list-item.js
index 7ccc5c315..1a13070c8 100644
--- a/ui/app/components/tx-list-item.js
+++ b/ui/app/components/tx-list-item.js
@@ -63,7 +63,7 @@ TxListItem.prototype.getAddressText = function () {
default:
return address
? `${address.slice(0, 10)}...${address.slice(-4)}`
- : 'Contract Published'
+ : 'Contract Deployment'
}
}
diff --git a/ui/app/css/itcss/components/header.scss b/ui/app/css/itcss/components/header.scss
index ac2cecf7e..d91ab3c48 100644
--- a/ui/app/css/itcss/components/header.scss
+++ b/ui/app/css/itcss/components/header.scss
@@ -76,6 +76,21 @@
}
}
+.beta-label {
+ font-family: Roboto;
+ text-transform: uppercase;
+ font-weight: 500;
+ font-size: 0.8rem;
+ padding-left: 9px;
+ color: $buttercup;
+ align-self: flex-start;
+ margin-top: 10px;
+
+ @media screen and (max-width: 575px) {
+ display: none;
+ }
+}
+
h2.page-subtitle {
text-transform: uppercase;
color: #aeaeae;
diff --git a/ui/app/css/itcss/components/newui-sections.scss b/ui/app/css/itcss/components/newui-sections.scss
index 73faebe8b..ecf5e1036 100644
--- a/ui/app/css/itcss/components/newui-sections.scss
+++ b/ui/app/css/itcss/components/newui-sections.scss
@@ -290,3 +290,27 @@ $wallet-view-bg: $alabaster;
.token-balance__amount {
padding-right: 6px;
}
+
+
+// first time
+.first-view-main {
+ display: flex;
+ flex-direction: row-reverse;
+ justify-content: space-between;
+
+ @media screen and (max-width: 575px) {
+ height: 100%;
+ }
+
+ @media screen and (min-width: 576px) {
+ width: 85vw;
+ }
+
+ @media screen and (min-width: 769px) {
+ width: 80vw;
+ }
+
+ @media screen and (min-width: 1281px) {
+ width: 62vw;
+ }
+} \ No newline at end of file