Promise is getting fulfilled even before my asynchronous operation is completed in swift PromiseKit


I am trying to load the details from Firebase in table view controller. Following is the service invocation and the promise is getting fulfilled even before the observation of all events are completed.

import Firebase
import PromiseKit

class ContactsTableViewModal: NSObject {
    var contacts: [User] = []
    func getContacts() ->Promise<[User]> {
        return Promise {
            seal in
            Database.database().reference().child("users").observe(.childAdded, with: { [unowned self] (snapShot) in
                guard let contactsDict = snapShot.value as? [String: AnyObject]
                    else {
                        return seal.reject(UserError.inputValuesAreEmpty)
                ///Observe the user one at a time from realtime database
                let user = User(userName: (contactsDict["username"] as! String), userEmail: contactsDict["email"] as! String)
            }) { (error) in


///The following is calling method invoked from my tableview controller.
func fetchContacts() {
        self.contactsTableViewModal.getContacts().done { [unowned self] (users) in
            *//Promise is fulfilling immediately and returning nil users*
            self.contactsTableView.contacts = users
            DispatchQueue.main.async {
        }.catch { (error) in