Skip to content

Commit

Permalink
fix: get or create primary identifier was not searching for the corre…
Browse files Browse the repository at this point in the history
…ct DID methods
  • Loading branch information
nklomp committed Jul 18, 2024
1 parent b0776a1 commit 8b1aad7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion packages/did-utils/src/did-functions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ export const getOrCreatePrimaryIdentifier = async (
context: IAgentContext<IDIDManager>,
opts?: CreateOrGetIdentifierOpts
): Promise<GetOrCreateResult<IIdentifier>> => {
const primaryIdentifier = await getPrimaryIdentifier(context, opts?.createOpts?.options)
const primaryIdentifier = await getPrimaryIdentifier(context, {...opts?.createOpts?.options, ...(opts?.method && {method: opts.method})})
if (primaryIdentifier !== undefined) {
return {
created: false,
Expand Down
1 change: 1 addition & 0 deletions packages/did-utils/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ export interface IIdentifierOpts {
export type IdentifierProviderOpts = {
type?: TKeyType
use?: string
method?: SupportedDidMethodEnum
[x: string]: any
}

Expand Down

0 comments on commit 8b1aad7

Please sign in to comment.