diff --git a/backend/src/graphql/resolver/TransactionLinkResolver.ts b/backend/src/graphql/resolver/TransactionLinkResolver.ts index 82fd1ca2e..907761309 100644 --- a/backend/src/graphql/resolver/TransactionLinkResolver.ts +++ b/backend/src/graphql/resolver/TransactionLinkResolver.ts @@ -29,6 +29,7 @@ import { User as DbUser, findModeratorCreatingContributionLink, findTransactionLinkByCode, + findUserByIdentifier, getHomeCommunity, getLastTransaction, } from 'database' @@ -660,6 +661,24 @@ export class TransactionLinkResolver { if (methodLogger.isDebugEnabled()) { methodLogger.debug('Disburse JWT was sent successfully with result=', result) } + const recipientUser = await findUserByIdentifier(recipientGradidoId, recipientCommunityUuid) + if (!recipientUser) { + const errmsg = `Recipient user not found with identifier=${recipientGradidoId}` + methodLogger.error(errmsg) + throw new LogError(errmsg) + } + await sendTransactionReceivedEmail({ + firstName: recipientFirstName, + lastName: recipientUser.lastName, + email: recipientUser.emailContact.email, + language: recipientUser.language, + memo, + senderFirstName: senderUser.firstName, + senderLastName: senderUser.lastName, + senderEmail: senderUser.emailContact.email, + transactionAmount: new Decimal(amount), + }) + } catch (e) { const errmsg = `Disburse JWT was not sent successfully with error=${e}` methodLogger.error(errmsg) diff --git a/docu/Concepts/TechnicalRequirements/image/UC_queryTransactionLink.drawio b/docu/Concepts/TechnicalRequirements/image/UC_queryTransactionLink.drawio new file mode 100644 index 000000000..32d12ac10 --- /dev/null +++ b/docu/Concepts/TechnicalRequirements/image/UC_queryTransactionLink.drawio @@ -0,0 +1,273 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +