From f2073dc156710b05e0700f5351a8cb9db401dfae Mon Sep 17 00:00:00 2001 From: Alex Date: Thu, 11 Jan 2024 16:07:15 +0100 Subject: [PATCH] removes signer serialization, logs --- src/utils/encrypt.ts | 2 +- src/utils/versioning.ts | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/utils/encrypt.ts b/src/utils/encrypt.ts index 18dfbc2..08b276c 100644 --- a/src/utils/encrypt.ts +++ b/src/utils/encrypt.ts @@ -6,7 +6,7 @@ import nacl from 'tweetnacl' export function signData(payload: any, env: Env) { const privateKey = Buffer.from(env.PRIVATE_KEY, 'hex') - const signature = nacl.sign.detached(Buffer.from(JSON.stringify(payload)), privateKey) + const signature = nacl.sign.detached(Buffer.from(payload), privateKey) return { signature: Buffer.from(signature).toString('hex') diff --git a/src/utils/versioning.ts b/src/utils/versioning.ts index b98a080..6b03fa7 100644 --- a/src/utils/versioning.ts +++ b/src/utils/versioning.ts @@ -23,7 +23,6 @@ export function makeResponsePayload(payload: any, version: VERSIONS, env: Env, r if (shouldEncode) { encodedData = stringToBase64(encodedData) - console.log('after encoding::', encodedData) displayData = encodedData }