diff --git a/packages/status-js/src/utils/payload-to-id.ts b/packages/status-js/src/utils/payload-to-id.ts index bf721398..2b2181f1 100644 --- a/packages/status-js/src/utils/payload-to-id.ts +++ b/packages/status-js/src/utils/payload-to-id.ts @@ -1,11 +1,11 @@ import { keccak256 } from 'ethereum-cryptography/keccak' -import { bytesToHex } from 'ethereum-cryptography/utils' +import { bytesToHex, concatBytes } from 'ethereum-cryptography/utils' export function payloadToId( payload: Uint8Array, publicKey: Uint8Array ): string { - const hash = keccak256(new Uint8Array([...publicKey, ...payload])) + const hash = keccak256(concatBytes(payload, publicKey)) const hex = bytesToHex(hash) return `0x${hex}`