Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: duplicate service ids in connections protocol #1589

Merged
merged 1 commit into from
Sep 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Loading