mirror of
https://github.com/IT4Change/gradido.git
synced 2026-04-06 01:25:28 +00:00
Merge branch 'master' into migrate_with_zig
This commit is contained in:
commit
5bae90a236
@ -570,7 +570,7 @@ export class TransactionLinkResolver {
|
||||
} catch (e) {
|
||||
const errmsg = `Error on creating Redeem JWT: error=${e}`
|
||||
methodLogger.error(errmsg)
|
||||
throw new LogError(errmsg)
|
||||
throw new Error(errmsg)
|
||||
}
|
||||
}
|
||||
|
||||
@ -612,19 +612,19 @@ export class TransactionLinkResolver {
|
||||
if (!senderCom) {
|
||||
const errmsg = `Sender community not found with uuid=${senderCommunityUuid}`
|
||||
methodLogger.error(errmsg)
|
||||
throw new LogError(errmsg)
|
||||
throw new Error(errmsg)
|
||||
}
|
||||
const senderFedCom = await DbFederatedCommunity.findOneBy({ publicKey: senderCom.publicKey })
|
||||
if (!senderFedCom) {
|
||||
const errmsg = `Sender federated community not found with publicKey=${senderCom.publicKey}`
|
||||
methodLogger.error(errmsg)
|
||||
throw new LogError(errmsg)
|
||||
throw new Error(errmsg)
|
||||
}
|
||||
const recipientCom = await getCommunityByUuid(recipientCommunityUuid)
|
||||
if (!recipientCom) {
|
||||
const errmsg = `Recipient community not found with uuid=${recipientCommunityUuid}`
|
||||
methodLogger.error(errmsg)
|
||||
throw new LogError(errmsg)
|
||||
throw new Error(errmsg)
|
||||
}
|
||||
const client = DisbursementClientFactory.getInstance(senderFedCom)
|
||||
if (client instanceof V1_0_DisbursementClient) {
|
||||
@ -663,17 +663,18 @@ export class TransactionLinkResolver {
|
||||
if (methodLogger.isDebugEnabled()) {
|
||||
methodLogger.debug('Disburse JWT was sent successfully with result=', result)
|
||||
}
|
||||
/* don't send email here, because it is sent by the sender community
|
||||
const senderUser = await findUserByIdentifier(senderGradidoId, senderCommunityUuid)
|
||||
if (!senderUser) {
|
||||
const errmsg = `Sender user not found with identifier=${senderGradidoId}`
|
||||
methodLogger.error(errmsg)
|
||||
throw new LogError(errmsg)
|
||||
throw new Error(errmsg)
|
||||
}
|
||||
const recipientUser = await findUserByIdentifier(recipientGradidoId, recipientCommunityUuid)
|
||||
if (!recipientUser) {
|
||||
const errmsg = `Recipient user not found with identifier=${recipientGradidoId}`
|
||||
methodLogger.error(errmsg)
|
||||
throw new LogError(errmsg)
|
||||
throw new Error(errmsg)
|
||||
}
|
||||
if (recipientUser.emailContact?.email !== null) {
|
||||
if (methodLogger.isDebugEnabled()) {
|
||||
@ -719,6 +720,7 @@ export class TransactionLinkResolver {
|
||||
)
|
||||
}
|
||||
}
|
||||
*/
|
||||
} catch (e) {
|
||||
const errmsg = `Disburse JWT was not sent successfully with error=${e}`
|
||||
methodLogger.error(errmsg)
|
||||
|
||||
@ -214,6 +214,7 @@ export const executeTransaction = async (
|
||||
transactionAmount: amount,
|
||||
})
|
||||
if (transactionLink) {
|
||||
const recipientCom = await getCommunityName(recipient.communityUuid)
|
||||
await sendTransactionLinkRedeemedEmail({
|
||||
firstName: sender.firstName,
|
||||
lastName: sender.lastName,
|
||||
@ -221,7 +222,7 @@ export const executeTransaction = async (
|
||||
language: sender.language,
|
||||
senderFirstName: recipient.firstName,
|
||||
senderLastName: recipient.lastName,
|
||||
senderEmail: recipient.emailContact.email,
|
||||
senderEmail: recipientCom, // recipient.emailContact.email,
|
||||
transactionAmount: amount,
|
||||
transactionMemo: memo,
|
||||
})
|
||||
|
||||
@ -172,19 +172,6 @@ export async function processXComCompleteTransaction(
|
||||
)
|
||||
}
|
||||
}
|
||||
/*
|
||||
await sendTransactionReceivedEmail({
|
||||
firstName: foreignUser.firstName,
|
||||
lastName: foreignUser.lastName,
|
||||
email: foreignUser.emailContact.email,
|
||||
language: foreignUser.language,
|
||||
memo,
|
||||
senderFirstName: senderUser.firstName,
|
||||
senderLastName: senderUser.lastName,
|
||||
senderEmail: senderUser.emailContact.email,
|
||||
transactionAmount: new Decimal(amount),
|
||||
})
|
||||
*/
|
||||
if (dbTransactionLink) {
|
||||
await sendTransactionLinkRedeemedEmail({
|
||||
firstName: senderUser.firstName,
|
||||
@ -193,7 +180,7 @@ export async function processXComCompleteTransaction(
|
||||
language: senderUser.language,
|
||||
senderFirstName: foreignUser.firstName,
|
||||
senderLastName: foreignUser.lastName,
|
||||
senderEmail: 'unknown', // foreignUser.emailContact.email,
|
||||
senderEmail: recipientCom.name!, // foreignUser.emailContact.email,
|
||||
transactionAmount: new Decimal(amount),
|
||||
transactionMemo: memo,
|
||||
})
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user