fix: creation of message ID

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

View File

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