From 8a68f5756939cfa86a0f837942ee30eacf81acd4 Mon Sep 17 00:00:00 2001 From: einhornimmond Date: Wed, 18 Jun 2025 11:46:11 +0200 Subject: [PATCH] make things more stable --- backend/src/graphql/resolver/UserResolver.ts | 2 +- backend/src/graphql/resolver/util/processXComSendCoins.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/backend/src/graphql/resolver/UserResolver.ts b/backend/src/graphql/resolver/UserResolver.ts index 2dc571901..14be59307 100644 --- a/backend/src/graphql/resolver/UserResolver.ts +++ b/backend/src/graphql/resolver/UserResolver.ts @@ -1172,7 +1172,7 @@ export async function findUserByEmail(email: string): Promise { return dbUser } catch (e) { const logger = createLogger() - if (e instanceof EntityNotFoundError) { + if (e instanceof EntityNotFoundError || (e as Error).name === 'EntityNotFoundError') { // TODO: discuss if it is ok to print email in log for this case logger.warn(`findUserByEmail failed, user with email=${email} not found`) } else { diff --git a/backend/src/graphql/resolver/util/processXComSendCoins.ts b/backend/src/graphql/resolver/util/processXComSendCoins.ts index 7115d3d1f..572a50f97 100644 --- a/backend/src/graphql/resolver/util/processXComSendCoins.ts +++ b/backend/src/graphql/resolver/util/processXComSendCoins.ts @@ -70,7 +70,7 @@ export async function processXComPendingSendCoins( const receiverFCom = await DbFederatedCommunity.findOneOrFail({ where: { - publicKey: receiverCom.publicKey, + publicKey: Buffer.from(receiverCom.publicKey), apiVersion: CONFIG.FEDERATION_BACKEND_SEND_ON_API, }, }) @@ -194,7 +194,7 @@ export async function processXComCommittingSendCoins( logger.debug('find pending Tx for settlement:', pendingTx) const receiverFCom = await DbFederatedCommunity.findOneOrFail({ where: { - publicKey: receiverCom.publicKey, + publicKey: Buffer.from(receiverCom.publicKey), apiVersion: CONFIG.FEDERATION_BACKEND_SEND_ON_API, },