diff options
author | Whymarrh Whitby <whymarrh.whitby@gmail.com> | 2018-06-06 05:06:56 +0800 |
---|---|---|
committer | Whymarrh Whitby <whymarrh.whitby@gmail.com> | 2018-06-06 05:06:56 +0800 |
commit | 3cc85c219ef565267093de80e709e53d57b38d4e (patch) | |
tree | ed986a8509a11cc0eccdb88228be8ea28652c209 | |
parent | c2e3194dbf4e2a3fd2bdffb3300ec0cd822dc78e (diff) | |
download | tangerine-wallet-browser-3cc85c219ef565267093de80e709e53d57b38d4e.tar tangerine-wallet-browser-3cc85c219ef565267093de80e709e53d57b38d4e.tar.gz tangerine-wallet-browser-3cc85c219ef565267093de80e709e53d57b38d4e.tar.bz2 tangerine-wallet-browser-3cc85c219ef565267093de80e709e53d57b38d4e.tar.lz tangerine-wallet-browser-3cc85c219ef565267093de80e709e53d57b38d4e.tar.xz tangerine-wallet-browser-3cc85c219ef565267093de80e709e53d57b38d4e.tar.zst tangerine-wallet-browser-3cc85c219ef565267093de80e709e53d57b38d4e.zip |
Add account type assertion to PreferencesController#setAccountLabel
-rw-r--r-- | app/scripts/controllers/preferences.js | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/app/scripts/controllers/preferences.js b/app/scripts/controllers/preferences.js index a5d8cc27b..8411e3a28 100644 --- a/app/scripts/controllers/preferences.js +++ b/app/scripts/controllers/preferences.js @@ -247,6 +247,7 @@ class PreferencesController { * @return {Promise<string>} */ setAccountLabel (account, label) { + if (!account) throw new Error('setAccountLabel requires a valid address, got ' + String(account)) const address = normalizeAddress(account) const {identities} = this.store.getState() identities[address] = identities[address] || {} |