aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorPaul Bouchon <mail@bitpshr.net>2018-05-01 06:07:25 +0800
committerGitHub <noreply@github.com>2018-05-01 06:07:25 +0800
commit5ec631cad34a31a1268c990f0b952453ce97090b (patch)
treeefccd8560595d2486cb88485c1b354fe9ea11f60 /ui
parenta93237a4cd8c5aa11f8db634ca65658e4f2b784f (diff)
downloadtangerine-wallet-browser-5ec631cad34a31a1268c990f0b952453ce97090b.tar
tangerine-wallet-browser-5ec631cad34a31a1268c990f0b952453ce97090b.tar.gz
tangerine-wallet-browser-5ec631cad34a31a1268c990f0b952453ce97090b.tar.bz2
tangerine-wallet-browser-5ec631cad34a31a1268c990f0b952453ce97090b.tar.lz
tangerine-wallet-browser-5ec631cad34a31a1268c990f0b952453ce97090b.tar.xz
tangerine-wallet-browser-5ec631cad34a31a1268c990f0b952453ce97090b.tar.zst
tangerine-wallet-browser-5ec631cad34a31a1268c990f0b952453ce97090b.zip
Handle Promise rejections when importing accounts (#4142)
* Silently catch import failures since errors exist in Redux state * Add comment about no-op catch statement
Diffstat (limited to 'ui')
-rw-r--r--ui/app/components/pages/create-account/import-account/json.js2
-rw-r--r--ui/app/components/pages/create-account/import-account/private-key.js2
2 files changed, 4 insertions, 0 deletions
diff --git a/ui/app/components/pages/create-account/import-account/json.js b/ui/app/components/pages/create-account/import-account/json.js
index 946907a47..0a3314b2a 100644
--- a/ui/app/components/pages/create-account/import-account/json.js
+++ b/ui/app/components/pages/create-account/import-account/json.js
@@ -105,6 +105,8 @@ class JsonImportSubview extends Component {
}
this.props.importNewJsonAccount([ fileContents, password ])
+ // JS runtime requires caught rejections but failures are handled by Redux
+ .catch()
}
}
diff --git a/ui/app/components/pages/create-account/import-account/private-key.js b/ui/app/components/pages/create-account/import-account/private-key.js
index c77612ea4..df7ac910a 100644
--- a/ui/app/components/pages/create-account/import-account/private-key.js
+++ b/ui/app/components/pages/create-account/import-account/private-key.js
@@ -91,5 +91,7 @@ PrivateKeyImportView.prototype.createNewKeychain = function () {
const { importNewAccount, history } = this.props
importNewAccount('Private Key', [ privateKey ])
+ // JS runtime requires caught rejections but failures are handled by Redux
+ .catch()
.then(() => history.push(DEFAULT_ROUTE))
}