xmtp / xmtp-js

XMTP client SDKs for JavaScript applications.
https://xmtp.org/docs
210 stars 38 forks source link

Bug: Unused Address set in Contacts #649

Open AlejoLovallo opened 1 month ago

AlejoLovallo commented 1 month ago

Describe the bug

In https://github.com/xmtp/xmtp-js/blob/main/packages/js-sdk/src/Contacts.ts#L332 the addresses set is not used at all and thus when retrieving the contacts list you only get an empty set. the

Expected behavior

Update the address set according the consent management behavior.

Steps to reproduce the bug

  /**
   * @dev Get client contacts
   * @returns set of string contacts addresses
   */
  private _getContacts(): Set<string> {
    return this.client.contacts.addresses
  }

Result

      Set(0) {}