Skip to content

Commit

Permalink
chore: delete redundant methods added by merge
Browse files Browse the repository at this point in the history
  • Loading branch information
tnotheis committed Oct 10, 2024
1 parent cb98858 commit ef7236a
Showing 1 changed file with 0 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -96,18 +96,6 @@ public IdentityAddress GetPeerOf(IdentityAddress activeIdentity)
return From == activeIdentity ? To : From;
}

private static void EnsureNoOtherRelationshipToPeerExists(IdentityAddress target, IEnumerable<Relationship> existingRelationshipsToPeer)
{
if (existingRelationshipsToPeer.Any(r => r.Status is RelationshipStatus.Active or RelationshipStatus.Pending or RelationshipStatus.Terminated or RelationshipStatus.DeletionProposed))
throw new DomainException(DomainErrors.RelationshipToTargetAlreadyExists());
}

private void EnsureTemplateIsAllocatedBy(RelationshipTemplate relationshipTemplate, IdentityAddress activeIdentity)
{
if (!relationshipTemplate.IsAllocatedBy(activeIdentity))
throw new DomainException(DomainErrors.RelationshipTemplateNotAllocated());
}

public void Accept(IdentityAddress activeIdentity, DeviceId activeDevice, byte[]? creationResponseContent)
{
EnsureStatus(RelationshipStatus.Pending);
Expand Down

0 comments on commit ef7236a

Please sign in to comment.