diff options
author | Dan Finlay <dan@danfinlay.com> | 2018-01-31 05:23:59 +0800 |
---|---|---|
committer | Dan Finlay <dan@danfinlay.com> | 2018-01-31 07:11:05 +0800 |
commit | 11a944719f52c256c585e788d064b45d08b8f5cf (patch) | |
tree | f752e00d9a659effd4824ea0f53d763ddf24ef8e | |
parent | 5f2d8eb5d2923b5b5658a49aafe5f36ccdf408c8 (diff) | |
download | tangerine-wallet-browser-11a944719f52c256c585e788d064b45d08b8f5cf.tar tangerine-wallet-browser-11a944719f52c256c585e788d064b45d08b8f5cf.tar.gz tangerine-wallet-browser-11a944719f52c256c585e788d064b45d08b8f5cf.tar.bz2 tangerine-wallet-browser-11a944719f52c256c585e788d064b45d08b8f5cf.tar.lz tangerine-wallet-browser-11a944719f52c256c585e788d064b45d08b8f5cf.tar.xz tangerine-wallet-browser-11a944719f52c256c585e788d064b45d08b8f5cf.tar.zst tangerine-wallet-browser-11a944719f52c256c585e788d064b45d08b8f5cf.zip |
Add warning when importing no valid file
Fixes #3089
-rw-r--r-- | CHANGELOG.md | 2 | ||||
-rw-r--r-- | ui/app/accounts/import/json.js | 6 |
2 files changed, 8 insertions, 0 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index 87a7a60c7..bab6d4062 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ ## Current Master +- Add warning for importing some kinds of files. + ## 3.13.8 2018-1-29 - Fix provider for Kovan network. diff --git a/ui/app/accounts/import/json.js b/ui/app/accounts/import/json.js index 158a3c923..15f9816e7 100644 --- a/ui/app/accounts/import/json.js +++ b/ui/app/accounts/import/json.js @@ -81,6 +81,12 @@ JsonImportSubview.prototype.createKeyringOnEnter = function (event) { JsonImportSubview.prototype.createNewKeychain = function () { const state = this.state + + if (!state) { + const message = 'You must select a valid file to import.' + return this.props.dispatch(actions.displayWarning(message)) + } + const { fileContents } = state if (!fileContents) { |