diff options
author | Dan J Miller <danjm.com@gmail.com> | 2018-02-08 23:50:04 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-08 23:50:04 +0800 |
commit | f39222c9afd9dcab4c6234940eb9a9cb06dbc6f0 (patch) | |
tree | 55840c5f6da9512b613aa289f8ba555fe8f7c290 /ui | |
parent | e9c2c0eec19514468fd53087f974709d5df9c35b (diff) | |
parent | b0db68a281168a94316823387b1670839990dd63 (diff) | |
download | tangerine-wallet-browser-f39222c9afd9dcab4c6234940eb9a9cb06dbc6f0.tar tangerine-wallet-browser-f39222c9afd9dcab4c6234940eb9a9cb06dbc6f0.tar.gz tangerine-wallet-browser-f39222c9afd9dcab4c6234940eb9a9cb06dbc6f0.tar.bz2 tangerine-wallet-browser-f39222c9afd9dcab4c6234940eb9a9cb06dbc6f0.tar.lz tangerine-wallet-browser-f39222c9afd9dcab4c6234940eb9a9cb06dbc6f0.tar.xz tangerine-wallet-browser-f39222c9afd9dcab4c6234940eb9a9cb06dbc6f0.tar.zst tangerine-wallet-browser-f39222c9afd9dcab4c6234940eb9a9cb06dbc6f0.zip |
Merge pull request #3206 from danjm/merge-uat-to-uatnext-feb072019
[NewUI] Merge uat to uatnext feb072019
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 d0436ad21..f930a93c1 100644 --- a/ui/app/actions.js +++ b/ui/app/actions.js @@ -72,12 +72,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', @@ -401,6 +403,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()) |