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.
feature/default_network_editable
Kevin Holder 4 years ago committed by GitHub
parent 1757c63473
commit 95acee95b5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      app/scripts/metamask-controller.js

@ -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),

Loading…
Cancel
Save