diff options
author | Alexander Tseung <alextsg@gmail.com> | 2018-05-31 07:17:40 +0800 |
---|---|---|
committer | Alexander Tseung <alextsg@users.noreply.github.com> | 2018-06-01 01:37:52 +0800 |
commit | cc73d869fed79c63261821fb7ad8f1e5180ffca2 (patch) | |
tree | cb4eb988a13843fa2c01a7fee0ca594bdc98e75f /ui/app/actions.js | |
parent | f4d833cb09758beb62a65ad4011d16bdb81b33ff (diff) | |
download | tangerine-wallet-browser-cc73d869fed79c63261821fb7ad8f1e5180ffca2.tar tangerine-wallet-browser-cc73d869fed79c63261821fb7ad8f1e5180ffca2.tar.gz tangerine-wallet-browser-cc73d869fed79c63261821fb7ad8f1e5180ffca2.tar.bz2 tangerine-wallet-browser-cc73d869fed79c63261821fb7ad8f1e5180ffca2.tar.lz tangerine-wallet-browser-cc73d869fed79c63261821fb7ad8f1e5180ffca2.tar.xz tangerine-wallet-browser-cc73d869fed79c63261821fb7ad8f1e5180ffca2.tar.zst tangerine-wallet-browser-cc73d869fed79c63261821fb7ad8f1e5180ffca2.zip |
Add new alert modals
Diffstat (limited to 'ui/app/actions.js')
-rw-r--r-- | ui/app/actions.js | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/ui/app/actions.js b/ui/app/actions.js index 649f740e9..a9372d6f3 100644 --- a/ui/app/actions.js +++ b/ui/app/actions.js @@ -503,17 +503,23 @@ function requestRevealSeedWords (password) { } function resetAccount () { - return (dispatch) => { - background.resetAccount((err, account) => { - dispatch(actions.hideLoadingIndication()) - if (err) { - dispatch(actions.displayWarning(err.message)) - } + return dispatch => { + dispatch(actions.showLoadingIndication()) - log.info('Transaction history reset for ' + account) - dispatch(actions.showAccountsPage()) - }) - } + return new Promise((resolve, reject) => { + background.resetAccount((err, account) => { + dispatch(actions.hideLoadingIndication()) + if (err) { + dispatch(actions.displayWarning(err.message)) + return reject(err) + } + + log.info('Transaction history reset for ' + account) + dispatch(actions.showAccountsPage()) + resolve(account) + }) + }) + } } function addNewKeyring (type, opts) { |