aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/components/pages
diff options
context:
space:
mode:
Diffstat (limited to 'ui/app/components/pages')
-rw-r--r--ui/app/components/pages/create-account/import-account/json.js3
-rw-r--r--ui/app/components/pages/create-account/import-account/private-key.js3
2 files changed, 2 insertions, 4 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 3dabad68e..23b7f0afd 100644
--- a/ui/app/components/pages/create-account/import-account/json.js
+++ b/ui/app/components/pages/create-account/import-account/json.js
@@ -106,8 +106,6 @@ class JsonImportSubview extends Component {
}
importNewJsonAccount([ fileContents, password ])
- // JS runtime requires caught rejections but failures are handled by Redux
- .catch()
.then(({ selectedAddress }) => {
if (selectedAddress) {
history.push(DEFAULT_ROUTE)
@@ -116,6 +114,7 @@ class JsonImportSubview extends Component {
setSelectedAddress(firstAddress)
}
})
+ .catch(err => displayWarning(err))
}
}
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 e71e47647..81cef09f9 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
@@ -96,8 +96,6 @@ PrivateKeyImportView.prototype.createNewKeychain = function () {
const { importNewAccount, history, displayWarning, setSelectedAddress, firstAddress } = this.props
importNewAccount('Private Key', [ privateKey ])
- // JS runtime requires caught rejections but failures are handled by Redux
- .catch()
.then(({ selectedAddress }) => {
if (selectedAddress) {
history.push(DEFAULT_ROUTE)
@@ -106,4 +104,5 @@ PrivateKeyImportView.prototype.createNewKeychain = function () {
setSelectedAddress(firstAddress)
}
})
+ .catch(err => displayWarning(err))
}