1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-22 09:57:02 +01:00

nodeify removeFromAddressBook (#9395)

Right now when editing an address in "Settings > Contact", the contact
is lost after saving. This is because the code awaits
`removeFromAddressBook()` before creating the new contact but
`removeFromAddressBook()` never resolves. This change fixes this bug.
This commit is contained in:
Kevin Holder 2020-09-11 08:28:51 -04:00 committed by GitHub
parent 1757c63473
commit 95acee95b5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -484,7 +484,7 @@ export default class MetamaskController extends EventEmitter {
// AddressController
setAddressBook: nodeify(this.addressBookController.set, this.addressBookController),
removeFromAddressBook: this.addressBookController.delete.bind(this.addressBookController),
removeFromAddressBook: nodeify(this.addressBookController.delete, this.addressBookController),
// AppStateController
setLastActiveTime: nodeify(this.appStateController.setLastActiveTime, this.appStateController),