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 /old-ui | |
parent | a93237a4cd8c5aa11f8db634ca65658e4f2b784f (diff) | |
download | tangerine-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 'old-ui')
-rw-r--r-- | old-ui/app/accounts/import/json.js | 2 | ||||
-rw-r--r-- | old-ui/app/accounts/import/private-key.js | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/old-ui/app/accounts/import/json.js b/old-ui/app/accounts/import/json.js index 3ee3b95df..8388f17a7 100644 --- a/old-ui/app/accounts/import/json.js +++ b/old-ui/app/accounts/import/json.js @@ -96,6 +96,8 @@ class JsonImportSubview extends Component { } this.props.importNewAccount([ fileContents, password ]) + // JS runtime requires caught rejections but failures are handled by Redux + .catch() } } diff --git a/old-ui/app/accounts/import/private-key.js b/old-ui/app/accounts/import/private-key.js index 105191105..92e42549d 100644 --- a/old-ui/app/accounts/import/private-key.js +++ b/old-ui/app/accounts/import/private-key.js @@ -64,4 +64,6 @@ PrivateKeyImportView.prototype.createNewKeychain = function () { const input = document.getElementById('private-key-box') const privateKey = input.value this.props.dispatch(actions.importNewAccount('Private Key', [ privateKey ])) + // JS runtime requires caught rejections but failures are handled by Redux + .catch() } |