mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-26 12:29:06 +01:00
Merge pull request #4514 from whymarrh/account-label-type-check
Add account type assertion to PreferencesController#setAccountLabel
This commit is contained in:
commit
546996c1f9
@ -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] || {}
|
||||
|
Loading…
Reference in New Issue
Block a user