aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG.md6
-rw-r--r--app/manifest.json2
-rw-r--r--app/scripts/contentscript.js19
-rw-r--r--app/scripts/lib/extension.js5
-rw-r--r--app/scripts/lib/notifications.js4
-rw-r--r--app/scripts/metamask-controller.js6
-rw-r--r--app/scripts/migrations/index.js1
-rw-r--r--package.json2
-rw-r--r--ui/app/actions.js4
-rw-r--r--ui/app/components/buy-button-subview.js11
-rw-r--r--ui/app/css/index.css1
-rw-r--r--ui/app/keychains/hd/create-vault-complete.js11
-rw-r--r--ui/app/keychains/hd/recover-seed/confirmation.js32
-rw-r--r--ui/app/reducers.js6
-rw-r--r--ui/app/reducers/metamask.js1
15 files changed, 64 insertions, 47 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 2ac434739..0a54cf886 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,6 +2,12 @@
## Current Master
+- Popup new transactions in Firefox.
+
+## 3.5.2 2017-3-28
+
+- Fix bug where gas estimate totals were sometimes wrong.
+- Add link to Kovan Test Faucet instructions on buy view.
- Inject web3 into loaded iFrames.
## 3.5.1 2017-3-27
diff --git a/app/manifest.json b/app/manifest.json
index a163d4c06..75e72c295 100644
--- a/app/manifest.json
+++ b/app/manifest.json
@@ -1,7 +1,7 @@
{
"name": "MetaMask",
"short_name": "Metamask",
- "version": "3.5.1",
+ "version": "3.5.2",
"manifest_version": 2,
"author": "https://metamask.io",
"description": "Ethereum Browser Extension",
diff --git a/app/scripts/contentscript.js b/app/scripts/contentscript.js
index 09c1841bf..9a390e580 100644
--- a/app/scripts/contentscript.js
+++ b/app/scripts/contentscript.js
@@ -65,14 +65,27 @@ function setupStreams () {
}
function shouldInjectWeb3 () {
- return isAllowedSuffix(window.location.href)
+ return doctypeCheck() || suffixCheck()
}
-function isAllowedSuffix (testCase) {
+function doctypeCheck () {
const doctype = window.document.doctype
if (doctype) {
return doctype.name === 'html'
} else {
- return true
+ return false
}
}
+
+function suffixCheck() {
+ var prohibitedTypes = ['xml', 'pdf']
+ var currentUrl = window.location.href
+ var currentRegex
+ for (let i = 0; i < prohibitedTypes.length; i++) {
+ currentRegex = new RegExp(`\.${prohibitedTypes[i]}$`)
+ if (currentRegex.test(currentUrl)) {
+ return false
+ }
+ }
+ return true
+}
diff --git a/app/scripts/lib/extension.js b/app/scripts/lib/extension.js
index 4b670490f..6f8b5d800 100644
--- a/app/scripts/lib/extension.js
+++ b/app/scripts/lib/extension.js
@@ -11,4 +11,7 @@
*/
const Extension = require('./extension-instance')
-module.exports = new Extension()
+const instance = new Extension()
+window.METAMASK_EXTENSION = instance
+module.exports = instance
+
diff --git a/app/scripts/lib/notifications.js b/app/scripts/lib/notifications.js
index 3db1ac6b5..0ec01f3a7 100644
--- a/app/scripts/lib/notifications.js
+++ b/app/scripts/lib/notifications.js
@@ -22,10 +22,12 @@ function show () {
extension.windows.create({
url: 'notification.html',
type: 'popup',
- focused: true,
width,
height,
})
+ .catch((reason) => {
+ log.error('failed to create poupup', reason)
+ })
}
})
}
diff --git a/app/scripts/metamask-controller.js b/app/scripts/metamask-controller.js
index 92533e022..03ea104e0 100644
--- a/app/scripts/metamask-controller.js
+++ b/app/scripts/metamask-controller.js
@@ -386,7 +386,7 @@ module.exports = class MetamaskController extends EventEmitter {
.then((serialized) => {
const seedWords = serialized.mnemonic
this.configManager.setSeedWords(seedWords)
- cb()
+ cb(null, seedWords)
})
}
@@ -623,6 +623,10 @@ module.exports = class MetamaskController extends EventEmitter {
case '3':
url = 'https://faucet.metamask.io/'
break
+
+ case '42':
+ url = 'https://github.com/kovan-testnet/faucet'
+ break
}
if (url) extension.tabs.create({ url })
diff --git a/app/scripts/migrations/index.js b/app/scripts/migrations/index.js
index a3dd48c17..019b4d13d 100644
--- a/app/scripts/migrations/index.js
+++ b/app/scripts/migrations/index.js
@@ -22,4 +22,5 @@ module.exports = [
require('./009'),
require('./010'),
require('./011'),
+ require('./012'),
]
diff --git a/package.json b/package.json
index 488e7e90d..9e04bc6f7 100644
--- a/package.json
+++ b/package.json
@@ -109,7 +109,7 @@
"valid-url": "^1.0.9",
"vreme": "^3.0.2",
"web3": "0.18.2",
- "web3-provider-engine": "^10.0.1",
+ "web3-provider-engine": "^11.0.2",
"web3-stream-provider": "^2.0.6",
"xtend": "^4.0.1"
},
diff --git a/ui/app/actions.js b/ui/app/actions.js
index 19c0e66ad..60b4c6f03 100644
--- a/ui/app/actions.js
+++ b/ui/app/actions.js
@@ -273,8 +273,10 @@ function requestRevealSeed (password) {
return dispatch(actions.displayWarning(err.message))
}
log.debug(`background.placeSeedWords`)
- background.placeSeedWords((err) => {
+ background.placeSeedWords((err, result) => {
if (err) return dispatch(actions.displayWarning(err.message))
+ dispatch(actions.hideLoadingIndication())
+ dispatch(actions.showNewVaultSeed(result))
})
})
}
diff --git a/ui/app/components/buy-button-subview.js b/ui/app/components/buy-button-subview.js
index 3074bd7cd..7b993110d 100644
--- a/ui/app/components/buy-button-subview.js
+++ b/ui/app/components/buy-button-subview.js
@@ -121,15 +121,22 @@ BuyButtonSubview.prototype.formVersionSubview = function () {
h('h3.text-transform-uppercase', {
style: {
width: '225px',
+ marginBottom: '15px',
},
}, 'In order to access this feature, please switch to the Main Network'),
- (this.props.network === '3') ? h('h3.text-transform-uppercase', 'or:') : null,
+ ((this.props.network === '3') || (this.props.network === '42')) ? h('h3.text-transform-uppercase', 'or go to the') : null,
(this.props.network === '3') ? h('button.text-transform-uppercase', {
onClick: () => this.props.dispatch(actions.buyEth()),
style: {
marginTop: '15px',
},
- }, 'Go To Test Faucet') : null,
+ }, 'Ropsten Test Faucet') : null,
+ (this.props.network === '42') ? h('button.text-transform-uppercase', {
+ onClick: () => this.props.dispatch(actions.buyEth()),
+ style: {
+ marginTop: '15px',
+ },
+ }, 'Kovan Test Faucet') : null,
])
}
}
diff --git a/ui/app/css/index.css b/ui/app/css/index.css
index de8ae0e92..033502f5a 100644
--- a/ui/app/css/index.css
+++ b/ui/app/css/index.css
@@ -148,7 +148,6 @@ h2.page-subtitle {
}
textarea.twelve-word-phrase {
- margin-top: 20px;
padding: 12px;
width: 300px;
height: 140px;
diff --git a/ui/app/keychains/hd/create-vault-complete.js b/ui/app/keychains/hd/create-vault-complete.js
index 7272ebdbd..5230797ad 100644
--- a/ui/app/keychains/hd/create-vault-complete.js
+++ b/ui/app/keychains/hd/create-vault-complete.js
@@ -45,12 +45,17 @@ CreateVaultCompleteScreen.prototype.render = function () {
'Vault Created',
]),
- h('span.error', { // Error for the right red
+ h('div', {
style: {
- padding: '12px 20px 0px 20px',
+ width: '360px',
+ height: '78px',
+ fontSize: '1em',
+ marginTop: '10px',
textAlign: 'center',
},
- }, 'These 12 words can restore all of your MetaMask accounts for this vault.\nSave them somewhere safe and secret.'),
+ }, [
+ h('span.error', 'These 12 words can restore all of your MetaMask accounts for this vault.\nSave them somewhere safe and secret.'),
+ ]),
h('textarea.twelve-word-phrase', {
readOnly: true,
diff --git a/ui/app/keychains/hd/recover-seed/confirmation.js b/ui/app/keychains/hd/recover-seed/confirmation.js
index 56ac461ea..4ccbec9fc 100644
--- a/ui/app/keychains/hd/recover-seed/confirmation.js
+++ b/ui/app/keychains/hd/recover-seed/confirmation.js
@@ -18,11 +18,8 @@ function mapStateToProps (state) {
}
}
-RevealSeedConfirmation.prototype.confirmationPhrase = 'I understand'
-
RevealSeedConfirmation.prototype.render = function () {
const props = this.props
- const state = this.state
return (
@@ -64,31 +61,13 @@ RevealSeedConfirmation.prototype.render = function () {
},
}),
- h(`h4${state && state.confirmationWrong ? '.error' : ''}`, {
- style: {
- marginTop: '12px',
- },
- }, `Enter the phrase "${this.confirmationPhrase}" to proceed.`),
-
- // confirm confirmation
- h('input.large-input.letter-spacey', {
- type: 'text',
- id: 'confirm-box',
- placeholder: this.confirmationPhrase,
- onKeyPress: this.checkConfirmation.bind(this),
- style: {
- width: 260,
- marginTop: 16,
- },
- }),
-
h('.flex-row.flex-space-between', {
style: {
marginTop: 30,
width: '50%',
},
}, [
-// cancel
+ // cancel
h('button.primary', {
onClick: this.goHome.bind(this),
}, 'CANCEL'),
@@ -134,15 +113,6 @@ RevealSeedConfirmation.prototype.checkConfirmation = function (event) {
}
RevealSeedConfirmation.prototype.revealSeedWords = function () {
- this.setState({ confirmationWrong: false })
-
- const confirmBox = document.getElementById('confirm-box')
- const confirmation = confirmBox.value
- if (confirmation !== this.confirmationPhrase) {
- confirmBox.value = ''
- return this.setState({ confirmationWrong: true })
- }
-
var password = document.getElementById('password-box').value
this.props.dispatch(actions.requestRevealSeed(password))
}
diff --git a/ui/app/reducers.js b/ui/app/reducers.js
index 4d10e2b39..c656af849 100644
--- a/ui/app/reducers.js
+++ b/ui/app/reducers.js
@@ -42,6 +42,10 @@ function rootReducer (state, action) {
}
window.logState = function () {
- var stateString = JSON.stringify(window.METAMASK_CACHED_LOG_STATE, null, 2)
+ var stateString = JSON.stringify(window.METAMASK_CACHED_LOG_STATE, removeSeedWords, 2)
console.log(stateString)
}
+
+function removeSeedWords (key, value) {
+ return key === 'seedWords' ? undefined : value
+}
diff --git a/ui/app/reducers/metamask.js b/ui/app/reducers/metamask.js
index 2b5151466..e0c416c2d 100644
--- a/ui/app/reducers/metamask.js
+++ b/ui/app/reducers/metamask.js
@@ -94,6 +94,7 @@ function reduceMetamask (state, action) {
return extend(metamaskState, {
isUnlocked: true,
isInitialized: false,
+ seedWords: action.value,
})
case actions.CLEAR_SEED_WORD_CACHE: