Skip to content

Commit

Permalink
feat(core): Fix issue decentralized-identity#229
Browse files Browse the repository at this point in the history
  • Loading branch information
Andres Junge committed Sep 2, 2020
1 parent 654f583 commit e091c93
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions packages/daf-core/src/identity/identity-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,11 @@ export class IdentityManager {
}

async getIdentity(did: string): Promise<AbstractIdentity> {
const identities = await this.getIdentities()
const identity = identities.find(item => item.did === did)
let identity: AbstractIdentity
for (const identityProvider of this.identityProviders) {
const providerIdentity = await identityProvider.getIdentity(did)
if (providerIdentity) identity = providerIdentity
}
if (identity) {
return identity
} else {
Expand Down

0 comments on commit e091c93

Please sign in to comment.