aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorDan <danjm.com@gmail.com>2018-02-08 08:49:14 +0800
committerDan <danjm.com@gmail.com>2018-02-08 08:49:14 +0800
commitb0db68a281168a94316823387b1670839990dd63 (patch)
tree153ca25095e5293951df032c8aa4860b2fe9965d /ui
parent7f151b861cc3a565d3feefc50b3be25ab4490ac8 (diff)
parentc50a197ab95b462b4416cbf85139f80db9b70f0c (diff)
downloadtangerine-wallet-browser-b0db68a281168a94316823387b1670839990dd63.tar
tangerine-wallet-browser-b0db68a281168a94316823387b1670839990dd63.tar.gz
tangerine-wallet-browser-b0db68a281168a94316823387b1670839990dd63.tar.bz2
tangerine-wallet-browser-b0db68a281168a94316823387b1670839990dd63.tar.lz
tangerine-wallet-browser-b0db68a281168a94316823387b1670839990dd63.tar.xz
tangerine-wallet-browser-b0db68a281168a94316823387b1670839990dd63.tar.zst
tangerine-wallet-browser-b0db68a281168a94316823387b1670839990dd63.zip
Merge branch 'uat' into uat-next
Diffstat (limited to 'ui')
-rw-r--r--ui/app/accounts/import/json.js6
-rw-r--r--ui/app/actions.js16
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())