fix: creation of message ID

This commit is contained in:
Pavel Prichodko 2022-06-15 15:19:28 +02:00
parent 8dbe361c86
commit f22d744732
No known key found for this signature in database
GPG Key ID: 0EB8D75C775AB6F1
1 changed files with 1 additions and 1 deletions

View File

@ -5,7 +5,7 @@ export function payloadToId(
payload: Uint8Array,
publicKey: Uint8Array
): string {
const hash = keccak256(concatBytes(payload, publicKey))
const hash = keccak256(concatBytes(publicKey, payload)) // order matters
const hex = bytesToHex(hash)
return `0x${hex}`