Skip to content

Commit

Permalink
feat: better public key comparison
Browse files Browse the repository at this point in the history
  • Loading branch information
agazso committed Nov 24, 2023
1 parent 30b573b commit fd2f929
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib/adapters/waku/crypto.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,6 @@ export function privateKeyToPublicKey(privateKey: Hex | Uint8Array): Hex {
return bytesToHex(publicKeyBytes)
}

export function arePublicKeysEqual(pkA: Hex, pkB: Hex): boolean {
return fixHex(pkA) === fixHex(pkB)
export function arePublicKeysEqual(pkA: Hex | Uint8Array, pkB: Hex | Uint8Array): boolean {
return compressPublicKey(pkA) === compressPublicKey(pkB)
}

0 comments on commit fd2f929

Please sign in to comment.