mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
Remove redundant removal of loading indicator. Integrate loading indicator disappear with display warning.
This commit is contained in:
parent
10040bee49
commit
605c2a7404
@ -215,7 +215,7 @@ function confirmSeedWords () {
|
|||||||
dispatch(actions.showLoadingIndication())
|
dispatch(actions.showLoadingIndication())
|
||||||
log.debug(`background.clearSeedWordCache`)
|
log.debug(`background.clearSeedWordCache`)
|
||||||
background.clearSeedWordCache((err, account) => {
|
background.clearSeedWordCache((err, account) => {
|
||||||
dispatch(actions.hideLoadingIndication())
|
// dispatch(actions.hideLoadingIndication())
|
||||||
if (err) {
|
if (err) {
|
||||||
return dispatch(actions.displayWarning(err.message))
|
return dispatch(actions.displayWarning(err.message))
|
||||||
}
|
}
|
||||||
@ -231,7 +231,7 @@ function createNewVaultAndRestore (password, seed) {
|
|||||||
dispatch(actions.showLoadingIndication())
|
dispatch(actions.showLoadingIndication())
|
||||||
log.debug(`background.createNewVaultAndRestore`)
|
log.debug(`background.createNewVaultAndRestore`)
|
||||||
background.createNewVaultAndRestore(password, seed, (err) => {
|
background.createNewVaultAndRestore(password, seed, (err) => {
|
||||||
dispatch(actions.hideLoadingIndication())
|
// dispatch(actions.hideLoadingIndication())
|
||||||
if (err) return dispatch(actions.displayWarning(err.message))
|
if (err) return dispatch(actions.displayWarning(err.message))
|
||||||
dispatch(actions.showAccountsPage())
|
dispatch(actions.showAccountsPage())
|
||||||
})
|
})
|
||||||
@ -270,13 +270,11 @@ function requestRevealSeed (password) {
|
|||||||
log.debug(`background.submitPassword`)
|
log.debug(`background.submitPassword`)
|
||||||
background.submitPassword(password, (err) => {
|
background.submitPassword(password, (err) => {
|
||||||
if (err) {
|
if (err) {
|
||||||
dispatch(actions.hideLoadingIndication())
|
|
||||||
return dispatch(actions.displayWarning(err.message))
|
return dispatch(actions.displayWarning(err.message))
|
||||||
}
|
}
|
||||||
log.debug(`background.placeSeedWords`)
|
log.debug(`background.placeSeedWords`)
|
||||||
background.placeSeedWords((err) => {
|
background.placeSeedWords((err) => {
|
||||||
if (err) return dispatch(actions.displayWarning(err.message))
|
if (err) return dispatch(actions.displayWarning(err.message))
|
||||||
dispatch(actions.hideLoadingIndication())
|
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@ -299,7 +297,6 @@ function importNewAccount (strategy, args) {
|
|||||||
dispatch(actions.showLoadingIndication('This may take a while, be patient.'))
|
dispatch(actions.showLoadingIndication('This may take a while, be patient.'))
|
||||||
log.debug(`background.importAccountWithStrategy`)
|
log.debug(`background.importAccountWithStrategy`)
|
||||||
background.importAccountWithStrategy(strategy, args, (err) => {
|
background.importAccountWithStrategy(strategy, args, (err) => {
|
||||||
dispatch(actions.hideLoadingIndication())
|
|
||||||
if (err) return dispatch(actions.displayWarning(err.message))
|
if (err) return dispatch(actions.displayWarning(err.message))
|
||||||
log.debug(`background.getState`)
|
log.debug(`background.getState`)
|
||||||
background.getState((err, newState) => {
|
background.getState((err, newState) => {
|
||||||
|
@ -426,6 +426,7 @@ function reduceApp (state, action) {
|
|||||||
case actions.DISPLAY_WARNING:
|
case actions.DISPLAY_WARNING:
|
||||||
return extend(appState, {
|
return extend(appState, {
|
||||||
warning: action.value,
|
warning: action.value,
|
||||||
|
isLoading: false,
|
||||||
})
|
})
|
||||||
|
|
||||||
case actions.HIDE_WARNING:
|
case actions.HIDE_WARNING:
|
||||||
|
Loading…
Reference in New Issue
Block a user