mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
Merge pull request #4026 from MetaMask/i4015-oldui-seed
Fix exception thrown when revealing seed words
This commit is contained in:
commit
73b2960e7f
@ -345,10 +345,9 @@ function transitionBackward () {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function confirmSeedWords () {
|
function clearSeedWordCache () {
|
||||||
|
log.debug(`background.clearSeedWordCache`)
|
||||||
return dispatch => {
|
return dispatch => {
|
||||||
dispatch(actions.showLoadingIndication())
|
|
||||||
log.debug(`background.clearSeedWordCache`)
|
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
background.clearSeedWordCache((err, account) => {
|
background.clearSeedWordCache((err, account) => {
|
||||||
if (err) {
|
if (err) {
|
||||||
@ -361,9 +360,22 @@ function confirmSeedWords () {
|
|||||||
resolve(account)
|
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
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user