mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 01:39:44 +01:00
Add account type assertion to PreferencesController#setAccountLabel
This commit is contained in:
parent
c2e3194dbf
commit
3cc85c219e
@ -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