aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWhymarrh Whitby <whymarrh.whitby@gmail.com>2018-06-06 05:06:56 +0800
committerWhymarrh Whitby <whymarrh.whitby@gmail.com>2018-06-06 05:06:56 +0800
commit3cc85c219ef565267093de80e709e53d57b38d4e (patch)
treeed986a8509a11cc0eccdb88228be8ea28652c209
parentc2e3194dbf4e2a3fd2bdffb3300ec0cd822dc78e (diff)
downloadtangerine-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.js1
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] || {}