Skip to content
This repository has been archived by the owner on Dec 16, 2021. It is now read-only.

feat: implement getting identities by multiple public keys hashes #388

Merged
merged 10 commits into from
Oct 7, 2020

Conversation

jawid-h
Copy link
Contributor

@jawid-h jawid-h commented Sep 18, 2020

Issue being fixed or feature implemented

Adding method to get multiple identity and its ids by multiple public key hashes.

What was done?

Added method to get multiple identity and its ids by multiple public key hashes.

How Has This Been Tested?

Unit tests.

Breaking Changes

None.

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or updated relevant unit/integration/functional/e2e tests
  • I have made corresponding changes to the documentation

For repository code-owners and collaborators only

  • I have assigned this pull request to a milestone

@jawid-h jawid-h added this to the v0.16 milestone Sep 18, 2020
const identityId = await publicKeyIdentityIdRepository.fetch(publicKeyHash);

if (!identityId) {
return null;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's pass empty Buffer

async function identityIdsByPublicKeyHashesQueryHandler(params, { publicKeyHashes }) {
const identityIds = await Promise.all(
publicKeyHashes.map(async (publicKeyHash) => (
publicKeyIdentityIdRepository.fetch(publicKeyHash)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Check for null and return empty buffer in this case

@lgtm-com
Copy link

lgtm-com bot commented Oct 6, 2020

This pull request introduces 1 alert when merging 9a2a902 into 072c5fe - view on LGTM.com

new alerts:

  • 1 for Unused variable, import, function or class

shumkov
shumkov previously approved these changes Oct 6, 2020
Copy link
Member

@shumkov shumkov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Copy link
Member

@shumkov shumkov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@jawid-h jawid-h merged commit a37281a into v0.16-dev Oct 7, 2020
@jawid-h jawid-h deleted the feat/multiple-public-key-hashes-query branch October 7, 2020 11:03
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants