Skip to content

Commit

Permalink
pr comments
Browse files Browse the repository at this point in the history
  • Loading branch information
gabe committed May 24, 2023
1 parent f6657de commit 601c509
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions did/ion/did.go
Original file line number Diff line number Diff line change
Expand Up @@ -226,28 +226,28 @@ func removePublicKeysPatch(doc did.Document, patch RemovePublicKeysAction) (*did

// TODO(gabe): in the future handle the case where the value is not a simple ID
// remove from all other key lists
for j, auth := range doc.Authentication {
if auth == id {
for j, a := range doc.Authentication {
if a == id {
doc.Authentication = append(doc.Authentication[:j], doc.Authentication[j+1:]...)
}
}
for j, am := range doc.AssertionMethod {
if auth == id {
if am == id {
doc.AssertionMethod = append(doc.AssertionMethod[:j], doc.AssertionMethod[j+1:]...)
}
}
for j, auth := range doc.Authentication {
if auth == id {
doc.Authentication = append(doc.Authentication[:j], doc.Authentication[j+1:]...)
for j, ka := range doc.KeyAgreement {
if ka == id {
doc.KeyAgreement = append(doc.KeyAgreement[:j], doc.KeyAgreement[j+1:]...)
}
}
for j, auth := range doc.CapabilityInvocation {
if auth == id {
for j, ci := range doc.CapabilityInvocation {
if ci == id {
doc.CapabilityInvocation = append(doc.CapabilityInvocation[:j], doc.CapabilityInvocation[j+1:]...)
}
}
for j, auth := range doc.CapabilityDelegation {
if auth == id {
for j, cd := range doc.CapabilityDelegation {
if cd == id {
doc.CapabilityDelegation = append(doc.CapabilityDelegation[:j], doc.CapabilityDelegation[j+1:]...)
}
}
Expand Down

0 comments on commit 601c509

Please sign in to comment.