Skip to content

Commit

Permalink
issue #714 update pub keys sorting
Browse files Browse the repository at this point in the history
  • Loading branch information
sosnovsky committed Oct 26, 2021
1 parent 0f280e9 commit b11370f
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,10 @@ extension RecipientWithSortedPubKeys {
.sorted(by: { key1, key2 in
// check if key1 is revoked
guard !key1.isRevoked else { return false }
// check if key1 never expires
guard let expire1 = key1.expiresOn else { return true }
// check if key2 is revoked
guard !key2.isRevoked else { return true }
// check if key1 never expires
guard let expire1 = key1.expiresOn else { return true }
// check if key2 never expires
guard let expire2 = key2.expiresOn else { return false }
// compare expire dates
Expand Down

0 comments on commit b11370f

Please sign in to comment.