Skip to content

Commit

Permalink
fix: duplicate service ids in connections protocol (#1589)
Browse files Browse the repository at this point in the history
  • Loading branch information
genaris committed Sep 26, 2023
1 parent 9d789fa commit dd75be8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Expand Up @@ -155,7 +155,7 @@ describe('ConnectionService', () => {

service: [
new IndyAgentService({
id: `XpwgBjsC2wh3eHcMW6ZRJT#IndyAgentService`,
id: `XpwgBjsC2wh3eHcMW6ZRJT#IndyAgentService-1`,
serviceEndpoint: agentConfig.endpoints[0],
recipientKeys: ['HoVPnpfUjrDECoMZy8vu4U6dwEcLhbzjNwyS3gwLDCG8'],
routingKeys: [],
Expand Down Expand Up @@ -426,7 +426,7 @@ describe('ConnectionService', () => {
authentication: [new ReferencedAuthentication(publicKey, authenticationTypes.Ed25519VerificationKey2018)],
service: [
new IndyAgentService({
id: `${did}#IndyAgentService`,
id: `${did}#IndyAgentService-1`,
serviceEndpoint: 'http://example.com',
recipientKeys: recipientKeys.map((did) => did.key.publicKeyBase58),
routingKeys: [],
Expand Down
Expand Up @@ -827,7 +827,7 @@ export class ConnectionService {
const services = routing.endpoints.map(
(endpoint, index) =>
new IndyAgentService({
id: `${indyDid}#IndyAgentService`,
id: `${indyDid}#IndyAgentService-${index + 1}`,
serviceEndpoint: endpoint,
recipientKeys: [routing.recipientKey.publicKeyBase58],
routingKeys: routing.routingKeys.map((key) => key.publicKeyBase58),
Expand Down Expand Up @@ -862,7 +862,7 @@ export class ConnectionService {
const service = services.map(
(service, index) =>
new IndyAgentService({
id: `${did}#IndyAgentService`,
id: `${did}#IndyAgentService-${index + 1}`,
serviceEndpoint: service.serviceEndpoint,
recipientKeys: [recipientKey.publicKeyBase58],
routingKeys: service.routingKeys?.map(didKeyToVerkey),
Expand Down

0 comments on commit dd75be8

Please sign in to comment.