aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app
diff options
context:
space:
mode:
authorFrankie <frankie.diamond@gmail.com>2018-01-31 07:32:04 +0800
committerGitHub <noreply@github.com>2018-01-31 07:32:04 +0800
commit1a32690a12e053a99396b2f2da1dc08eb03517f2 (patch)
treef752e00d9a659effd4824ea0f53d763ddf24ef8e /ui/app
parent5f2d8eb5d2923b5b5658a49aafe5f36ccdf408c8 (diff)
parent11a944719f52c256c585e788d064b45d08b8f5cf (diff)
downloadtangerine-wallet-browser-1a32690a12e053a99396b2f2da1dc08eb03517f2.tar
tangerine-wallet-browser-1a32690a12e053a99396b2f2da1dc08eb03517f2.tar.gz
tangerine-wallet-browser-1a32690a12e053a99396b2f2da1dc08eb03517f2.tar.bz2
tangerine-wallet-browser-1a32690a12e053a99396b2f2da1dc08eb03517f2.tar.lz
tangerine-wallet-browser-1a32690a12e053a99396b2f2da1dc08eb03517f2.tar.xz
tangerine-wallet-browser-1a32690a12e053a99396b2f2da1dc08eb03517f2.tar.zst
tangerine-wallet-browser-1a32690a12e053a99396b2f2da1dc08eb03517f2.zip
Merge pull request #3145 from MetaMask/i3089-FixNullError
Add warning when importing no valid file
Diffstat (limited to 'ui/app')
-rw-r--r--ui/app/accounts/import/json.js6
1 files changed, 6 insertions, 0 deletions
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) {