Skip to content

Commit

Permalink
Fix identity builder addService id to key
Browse files Browse the repository at this point in the history
  • Loading branch information
jasny committed Jul 20, 2023
1 parent 802b571 commit c8152de
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/identities/IdentityBuilder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ export default class IdentityBuilder {

const entries = this.newServices.map((service) => {
const id = service.id || kababCase(service.type);
const key = id.replace(new RegExp(`^${this.account.did}#`), '');
const key = id.replace(new RegExp(`^${this.account.did}#|^#`), '');

return [`did:service:${key}`, JSON.stringify(service)];
});
Expand Down

0 comments on commit c8152de

Please sign in to comment.