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, },