diff options
author | Paul Bouchon <mail@bitpshr.net> | 2018-05-01 06:07:25 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-05-01 06:07:25 +0800 |
commit | 5ec631cad34a31a1268c990f0b952453ce97090b (patch) | |
tree | efccd8560595d2486cb88485c1b354fe9ea11f60 /mascara/src | |
parent | a93237a4cd8c5aa11f8db634ca65658e4f2b784f (diff) | |
download | dexon-wallet-5ec631cad34a31a1268c990f0b952453ce97090b.tar.gz dexon-wallet-5ec631cad34a31a1268c990f0b952453ce97090b.tar.zst dexon-wallet-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 'mascara/src')
-rw-r--r-- | mascara/src/app/first-time/import-account-screen.js | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/mascara/src/app/first-time/import-account-screen.js b/mascara/src/app/first-time/import-account-screen.js index ab0aca0f..555a2638 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) } } |