diff --git a/src/lib/adapters/waku/crypto.ts b/src/lib/adapters/waku/crypto.ts index fdedf384..b7e7d63a 100644 --- a/src/lib/adapters/waku/crypto.ts +++ b/src/lib/adapters/waku/crypto.ts @@ -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) }