diff options
author | Frankie <frankie.diamond@gmail.com> | 2018-02-01 03:57:38 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-01 03:57:38 +0800 |
commit | 201e0579a57d4638c8c61e99c63b7c26821a0f2a (patch) | |
tree | 275bc04ea86f48b2c5f9109c69c7b21b93c744bf /ui/app/actions.js | |
parent | 7e144680134e1bf87727f5dd048e846996e8367a (diff) | |
parent | f16535619692dd7f1c24bcc07875d60804d50ee2 (diff) | |
download | tangerine-wallet-browser-201e0579a57d4638c8c61e99c63b7c26821a0f2a.tar.gz tangerine-wallet-browser-201e0579a57d4638c8c61e99c63b7c26821a0f2a.tar.zst tangerine-wallet-browser-201e0579a57d4638c8c61e99c63b7c26821a0f2a.zip |
Merge branch 'master' into localStorage-clean-up
Diffstat (limited to 'ui/app/actions.js')
-rw-r--r-- | ui/app/actions.js | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/ui/app/actions.js b/ui/app/actions.js index 52ea899aa..90acdc821 100644 --- a/ui/app/actions.js +++ b/ui/app/actions.js @@ -47,12 +47,14 @@ var actions = { addNewAccount, NEW_ACCOUNT_SCREEN: 'NEW_ACCOUNT_SCREEN', navigateToNewAccountScreen, + resetAccount, showNewVaultSeed: showNewVaultSeed, showInfoPage: showInfoPage, // seed recovery actions REVEAL_SEED_CONFIRMATION: 'REVEAL_SEED_CONFIRMATION', revealSeedConfirmation: revealSeedConfirmation, requestRevealSeed: requestRevealSeed, + // unlock screen UNLOCK_IN_PROGRESS: 'UNLOCK_IN_PROGRESS', UNLOCK_FAILED: 'UNLOCK_FAILED', @@ -308,6 +310,20 @@ function requestRevealSeed (password) { } } +function resetAccount () { + return (dispatch) => { + background.resetAccount((err, account) => { + dispatch(actions.hideLoadingIndication()) + if (err) { + dispatch(actions.displayWarning(err.message)) + } + + log.info('Transaction history reset for ' + account) + dispatch(actions.showAccountsPage()) + }) + } +} + function addNewKeyring (type, opts) { return (dispatch) => { dispatch(actions.showLoadingIndication()) |