|
|
@ -2488,34 +2488,27 @@ function setShowFiatConversionOnTestnetsPreference (value) { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
function setCompletedOnboarding () { |
|
|
|
function setCompletedOnboarding () { |
|
|
|
return dispatch => { |
|
|
|
return async dispatch => { |
|
|
|
dispatch(actions.showLoadingIndication()) |
|
|
|
dispatch(actions.showLoadingIndication()) |
|
|
|
return new Promise((resolve, reject) => { |
|
|
|
|
|
|
|
background.markAllNoticesRead(err => { |
|
|
|
try { |
|
|
|
|
|
|
|
await pify(background.markAllNoticesRead).call(background) |
|
|
|
|
|
|
|
} catch (err) { |
|
|
|
|
|
|
|
dispatch(actions.displayWarning(err.message)) |
|
|
|
|
|
|
|
throw err |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (err) { |
|
|
|
dispatch(actions.clearNotices()) |
|
|
|
dispatch(actions.displayWarning(err.message)) |
|
|
|
|
|
|
|
return reject(err) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
dispatch(actions.clearNotices()) |
|
|
|
try { |
|
|
|
resolve(false) |
|
|
|
await pify(background.completeOnboarding).call(background) |
|
|
|
}) |
|
|
|
} catch (err) { |
|
|
|
}) |
|
|
|
dispatch(actions.displayWarning(err.message)) |
|
|
|
.then(() => { |
|
|
|
throw err |
|
|
|
return new Promise((resolve, reject) => { |
|
|
|
} |
|
|
|
background.completeOnboarding(err => { |
|
|
|
|
|
|
|
if (err) { |
|
|
|
|
|
|
|
dispatch(actions.displayWarning(err.message)) |
|
|
|
|
|
|
|
return reject(err) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
dispatch(actions.completeOnboarding()) |
|
|
|
dispatch(actions.completeOnboarding()) |
|
|
|
dispatch(actions.hideLoadingIndication()) |
|
|
|
dispatch(actions.hideLoadingIndication()) |
|
|
|
resolve() |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|