1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 09:52:26 +01:00

A couple seed recovery enhancements

- The seed words are no longer stored on `state.appState.currentView.context`, which caused view glitches since it was shared with other views' data.
- The confirmation text warning color is now the same as other error messages'.
This commit is contained in:
Dan Finlay 2016-06-02 17:11:12 -07:00
parent 07617dbb07
commit 10fec9052f
3 changed files with 6 additions and 5 deletions

View File

@ -14,7 +14,7 @@ function CreateVaultCompleteScreen() {
function mapStateToProps(state) { function mapStateToProps(state) {
return { return {
seed: state.appState.currentView.context, seed: state.appState.currentView.seedWords,
cachedSeed: state.metamask.seedWords, cachedSeed: state.metamask.seedWords,
} }
} }

View File

@ -65,10 +65,9 @@ RevealSeedConfirmatoin.prototype.render = function() {
}, },
}), }),
h('h4', { h(`h4${state && state.confirmationWrong ? '.error' : ''}`, {
style: { style: {
marginTop: '12px', marginTop: '12px',
color: state && state.confirmationWrong ? 'red' : 'black',
} }
}, `Enter the phrase "I understand" to proceed.`), }, `Enter the phrase "I understand" to proceed.`),

View File

@ -25,10 +25,11 @@ function reduceApp(state, action) {
} }
// confirm seed words // confirm seed words
var seedWords = state.metamask.seedWords
var seedConfView = { var seedConfView = {
name: 'createVaultComplete', name: 'createVaultComplete',
seedWords,
} }
var seedWords = state.metamask.seedWords
var appState = extend({ var appState = extend({
menuOpen: false, menuOpen: false,
@ -111,7 +112,7 @@ function reduceApp(state, action) {
return extend(appState, { return extend(appState, {
currentView: { currentView: {
name: 'createVaultComplete', name: 'createVaultComplete',
context: action.value, seedWords: action.value,
}, },
transForward: true, transForward: true,
isLoading: false, isLoading: false,
@ -210,6 +211,7 @@ function reduceApp(state, action) {
return extend(appState, { return extend(appState, {
currentView: { currentView: {
name: seedWords ? 'createVaultComplete' : 'accounts', name: seedWords ? 'createVaultComplete' : 'accounts',
seedWords,
}, },
transForward: true, transForward: true,
isLoading: false, isLoading: false,