Skip to content

Commit

Permalink
fix: use delete third party for all third party attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
sebbi08 committed Jan 15, 2025
1 parent 1558037 commit d01247b
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions test/lib/testUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -531,24 +531,24 @@ export async function deleteAllAttributes(client: ConnectorClient, clientAddress
continue;
}

if (attribute.shareInfo.thirdPartyAddress) {
const result = await client.attributes.deleteThirdPartyRelationshipAttributeAndNotifyPeer(attribute.id);
expect(result).toBeSuccessful(ValidationSchema.DeleteThirdPartyRelationshipAttributeAndNotifyPeerResponse);
continue;
}

if (attribute.content.owner === clientAddress) {
const result = await client.attributes.deleteOwnSharedAttributeAndNotifyPeer(attribute.id);
expect(result).toBeSuccessful(ValidationSchema.DeleteOwnSharedAttributeAndNotifyPeerResponse);
continue;
}

if (attribute.content.owner !== clientAddress && !attribute.shareInfo.thirdPartyAddress) {
if (attribute.content.owner !== clientAddress) {
const result = await client.attributes.deletePeerSharedAttributeAndNotifyOwner(attribute.id);
expect(result).toBeSuccessful(ValidationSchema.DeletePeerSharedAttributeAndNotifyOwnerResponse);
continue;
}

if (attribute.shareInfo.thirdPartyAddress) {
const result = await client.attributes.deleteThirdPartyRelationshipAttributeAndNotifyPeer(attribute.id);
expect(result).toBeSuccessful(ValidationSchema.DeleteThirdPartyRelationshipAttributeAndNotifyPeerResponse);
continue;
}

throw new Error("No delete method called");
}
}

0 comments on commit d01247b

Please sign in to comment.