Skip to content

Commit

Permalink
dumped networkConfig fetched on logs
Browse files Browse the repository at this point in the history
  • Loading branch information
vignesha22 committed Aug 22, 2024
1 parent 2fa62f5 commit 78cc2e2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion backend/src/routes/paymaster-routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 78cc2e2

Please sign in to comment.