From 78cc2e205d17bb2d171ccc63657a39f9688514b2 Mon Sep 17 00:00:00 2001 From: Vignesh Date: Thu, 22 Aug 2024 16:07:51 +0530 Subject: [PATCH] dumped networkConfig fetched on logs --- backend/src/routes/paymaster-routes.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/backend/src/routes/paymaster-routes.ts b/backend/src/routes/paymaster-routes.ts index 83cc7f7..4a9f9b7 100644 --- a/backend/src/routes/paymaster-routes.ts +++ b/backend/src/routes/paymaster-routes.ts @@ -160,7 +160,8 @@ const paymasterRoutes: FastifyPluginAsync = async (server) => { } sponsorName = apiKeyEntity.sponsorName ? apiKeyEntity.sponsorName : ''; sponsorImage = apiKeyEntity.logoUrl ? apiKeyEntity.logoUrl : ''; - privateKey = decode(apiKeyEntity.privateKey, server.config.HMAC_SECRET); + // privateKey = decode(apiKeyEntity.privateKey, server.config.HMAC_SECRET); + privateKey = apiKeyEntity.privateKey; supportedNetworks = apiKeyEntity.supportedNetworks; noOfTxns = apiKeyEntity.noOfTransactionsInAMonth; txnMode = apiKeyEntity.transactionLimit; @@ -191,6 +192,7 @@ const paymasterRoutes: FastifyPluginAsync = async (server) => { ) return reply.code(ReturnCode.FAILURE).send({ error: ErrorMessage.UNSUPPORTED_NETWORK_TOKEN }) const networkConfig = getNetworkConfig(chainId, supportedNetworks ?? '', entryPoint); + server.log.warn(networkConfig, `Network Config fetched for ${api_key}: `); if (!networkConfig) return reply.code(ReturnCode.FAILURE).send({ error: ErrorMessage.UNSUPPORTED_NETWORK }); let result: any;