From 5ec631cad34a31a1268c990f0b952453ce97090b Mon Sep 17 00:00:00 2001 From: Paul Bouchon Date: Mon, 30 Apr 2018 18:07:25 -0400 Subject: Handle Promise rejections when importing accounts (#4142) * Silently catch import failures since errors exist in Redux state * Add comment about no-op catch statement --- mascara/src/app/first-time/import-account-screen.js | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'mascara') diff --git a/mascara/src/app/first-time/import-account-screen.js b/mascara/src/app/first-time/import-account-screen.js index ab0aca0f0..555a26386 100644 --- a/mascara/src/app/first-time/import-account-screen.js +++ b/mascara/src/app/first-time/import-account-screen.js @@ -70,10 +70,14 @@ class ImportAccountScreen extends Component { switch (this.state.selectedOption) { case OPTIONS.JSON_FILE: return importNewAccount('JSON File', [ jsonFile, password ]) + // JS runtime requires caught rejections but failures are handled by Redux + .catch() .then(next) case OPTIONS.PRIVATE_KEY: default: return importNewAccount('Private Key', [ privateKey ]) + // JS runtime requires caught rejections but failures are handled by Redux + .catch() .then(next) } } -- cgit