aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app
diff options
context:
space:
mode:
Diffstat (limited to 'ui/app')
-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
7 files changed, 27 insertions, 39 deletions
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: