diff --git a/javascript/event-attestator/test/ProofcastEventAttestator.spec.js b/javascript/event-attestator/test/ProofcastEventAttestator.spec.js index fe8d29bc..507b4886 100644 --- a/javascript/event-attestator/test/ProofcastEventAttestator.spec.js +++ b/javascript/event-attestator/test/ProofcastEventAttestator.spec.js @@ -54,8 +54,12 @@ describe('Proofcast Event Attestator Tests', () => { // We are going to extract this = require( the a subfield of the) // official data - const data = - '0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000746b6e2e746f6b656e00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000008a88f6dc465640000000000000000000000000000000000000000000000000000000000075736572000000000000000000000000000000000000000000000000000000000000002a307836386262656436613437313934656666316366353134623530656139313839353539376663393165' + const data = { + event_bytes: + '00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000746b6e2e746f6b656e00000000000000000000000000000000000000000000000000000000000000380000000000000000000000000000000000000000000000008a88f6dc465640000000000000000000000000000000000000000000000000000000000075736572000000000000000000000000000000000000000000000000000000000000002a307836386262656436613437313934656666316366353134623530656139313839353539376663393165', + } + + const hexData = `0x${Buffer.from(JSON.stringify(data)).toString('hex')}` const ea = new ProofcastEventAttestator({ version: Versions.V1, @@ -69,11 +73,11 @@ describe('Proofcast Event Attestator Tests', () => { transactionHash, account, action, - data, + data: hexData, } const expectedSignature = - '0x1cfc81a6dc16147e5d82d3b9c2fef1ef2125403b92f328439da20ddd5903aef1276adefaeaca2579a342b00149c6916f93d988f81514ab535ebf19dd4eebed3519' + '0x1b546cb297b24aab5b445756f1d0beece3dad851d2cbd8d973f89f69e83f82b77016c87be815fa95bf25d37fb10c3f884cb200d38495e2d1c1bb686e9de38842a5' expect(ea.formatEosSignature(ea.sign(event))).toStrictEqual( expectedSignature,