Skip to content

Commit

Permalink
fix: IdentityManager
Browse files Browse the repository at this point in the history
  • Loading branch information
simonas-notcat authored and mirceanis committed Sep 7, 2020
1 parent 4ef02e2 commit 1f2da11
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/daf-core/src/identity-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,10 @@ export class IdentityManager implements IAgentPlugin {
{ provider, alias, kms, options }: { alias?: string; provider?: string; kms?: string; options?: any },
context: IContext,
): Promise<IIdentity> {
const identityProvider = this.getProvider(provider || this.defaultProvider)
const providerName = provider || this.defaultProvider
const identityProvider = this.getProvider(providerName)
const partialIdentity = await identityProvider.createIdentity({ kms, options }, context)
const identity: IIdentity = {...partialIdentity, alias, provider}
const identity: IIdentity = {...partialIdentity, alias, provider: providerName}
await this.store.import(identity)
return identity
}
Expand Down

0 comments on commit 1f2da11

Please sign in to comment.