From 1d80a4c452cc41b28e0a6a565b8fd48f0ff0252d Mon Sep 17 00:00:00 2001 From: Alexander Tseung Date: Wed, 18 Apr 2018 16:10:42 -0700 Subject: Fix exception thrown when revealing seed words --- ui/app/actions.js | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) (limited to 'ui') diff --git a/ui/app/actions.js b/ui/app/actions.js index 73335db97..81d9c333b 100644 --- a/ui/app/actions.js +++ b/ui/app/actions.js @@ -345,10 +345,9 @@ function transitionBackward () { } } -function confirmSeedWords () { +function clearSeedWordCache () { + log.debug(`background.clearSeedWordCache`) return dispatch => { - dispatch(actions.showLoadingIndication()) - log.debug(`background.clearSeedWordCache`) return new Promise((resolve, reject) => { background.clearSeedWordCache((err, account) => { if (err) { @@ -361,9 +360,22 @@ function confirmSeedWords () { resolve(account) }) }) - .then(() => dispatch(setIsRevealingSeedWords(false))) - .then(() => dispatch(actions.hideLoadingIndication())) - .catch(() => dispatch(actions.hideLoadingIndication())) + } +} + +function confirmSeedWords () { + return async dispatch => { + dispatch(actions.showLoadingIndication()) + const account = await dispatch(clearSeedWordCache()) + return dispatch(setIsRevealingSeedWords(false)) + .then(() => { + dispatch(actions.hideLoadingIndication()) + return account + }) + .catch(() => { + dispatch(actions.hideLoadingIndication()) + return account + }) } } -- cgit v1.2.3 From 2fdf45b418133258377d9cfb46aae57954be5d29 Mon Sep 17 00:00:00 2001 From: Alexander Tseung Date: Wed, 18 Apr 2018 18:34:44 -0700 Subject: Show correct MetaMask version number in the Info page --- ui/app/components/pages/settings/info.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'ui') diff --git a/ui/app/components/pages/settings/info.js b/ui/app/components/pages/settings/info.js index eb9be66e6..bd9040499 100644 --- a/ui/app/components/pages/settings/info.js +++ b/ui/app/components/pages/settings/info.js @@ -3,6 +3,14 @@ const PropTypes = require('prop-types') const h = require('react-hyperscript') class Info extends Component { + constructor (props) { + super(props) + + this.state = { + version: global.platform.getVersion(), + } + } + renderLogo () { return ( h('div.settings__info-logo-wrapper', [ @@ -76,7 +84,7 @@ class Info extends Component { this.renderLogo(), h('div.settings__info-item', [ h('div.settings__info-version-header', 'MetaMask Version'), - h('div.settings__info-version-number', '4.0.0'), + h('div.settings__info-version-number', this.state.version), ]), h('div.settings__info-item', [ h( -- cgit v1.2.3