From fbbad3978976139cc114f6ab5d4896143c204896 Mon Sep 17 00:00:00 2001 From: AlexNi245 Date: Mon, 29 Jul 2024 14:46:58 +0200 Subject: [PATCH] more logging --- packages/delivery-service/src/index.ts | 5 +++++ packages/lib/delivery/src/Session.ts | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/packages/delivery-service/src/index.ts b/packages/delivery-service/src/index.ts index 5906a0b61..f22d4e876 100644 --- a/packages/delivery-service/src/index.ts +++ b/packages/delivery-service/src/index.ts @@ -46,6 +46,11 @@ const getDbWithAddressResolvedGetAccount = ( ) => { return async (ensName: string) => { const address = await web3Provider.resolveName(ensName); + console.debug( + 'getDbWithAddressResolvedGetAccount resolved address for ens name: ', + ensName, + address, + ); if (!address) { console.info('no address found for ens name: ', ensName); return null; diff --git a/packages/lib/delivery/src/Session.ts b/packages/lib/delivery/src/Session.ts index 3e68f82cd..196f65a88 100644 --- a/packages/lib/delivery/src/Session.ts +++ b/packages/lib/delivery/src/Session.ts @@ -45,6 +45,9 @@ export async function checkToken( return false; } + console.debug('checkToken - ensName', ensName); + console.debug('checkToken - session', session); + // check jwt for validity try { // will throw if signature is invalid or exp is in the past @@ -52,6 +55,8 @@ export async function checkToken( algorithms: ['HS256'], }); + console.debug('checkToken - jwtPayload', jwtPayload); + // check if payload is well formed if ( typeof jwtPayload === 'string' ||