diff options
author | Dan <danjm.com@gmail.com> | 2018-02-08 04:02:47 +0800 |
---|---|---|
committer | Dan <danjm.com@gmail.com> | 2018-02-08 04:02:47 +0800 |
commit | d8896a8c316e9287ab68fdfa3fa9a7ed157f3245 (patch) | |
tree | 6a30f73fa59331e230caa0977373e983424c5081 /ui | |
parent | a9ecf9c6fcbffb2b1984058fa6c6eef3c968b9c4 (diff) | |
parent | dc24a6e8c26ec0110b8ecdbb3881419abe7098fe (diff) | |
download | tangerine-wallet-browser-d8896a8c316e9287ab68fdfa3fa9a7ed157f3245.tar.gz tangerine-wallet-browser-d8896a8c316e9287ab68fdfa3fa9a7ed157f3245.tar.zst tangerine-wallet-browser-d8896a8c316e9287ab68fdfa3fa9a7ed157f3245.zip |
Merge branch 'master' into uat
Diffstat (limited to 'ui')
-rw-r--r-- | ui/app/accounts/import/json.js | 6 | ||||
-rw-r--r-- | ui/app/actions.js | 16 |
2 files changed, 22 insertions, 0 deletions
diff --git a/ui/app/accounts/import/json.js b/ui/app/accounts/import/json.js index 9cefcfa77..dd5dfad22 100644 --- a/ui/app/accounts/import/json.js +++ b/ui/app/accounts/import/json.js @@ -81,6 +81,12 @@ JsonImportSubview.prototype.createKeyringOnEnter = function (event) { JsonImportSubview.prototype.createNewKeychain = function () { const state = this.state + + if (!state) { + const message = 'You must select a valid file to import.' + return this.props.dispatch(actions.displayWarning(message)) + } + const { fileContents } = state if (!fileContents) { diff --git a/ui/app/actions.js b/ui/app/actions.js index 25cb2c23f..977458023 100644 --- a/ui/app/actions.js +++ b/ui/app/actions.js @@ -69,12 +69,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', @@ -396,6 +398,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()) |