mirror of
https://github.com/IT4Change/gradido.git
synced 2026-02-06 09:56:05 +00:00
reduce review noise
This commit is contained in:
parent
2ac59f99cf
commit
45321810f7
@ -69,7 +69,7 @@ export const executeTransaction = async (
|
||||
}
|
||||
|
||||
try {
|
||||
logger.info('executeTransaction', memo)
|
||||
logger.info('executeTransaction', amount, memo, sender, recipient)
|
||||
|
||||
if (await countOpenPendingTransactions([sender.gradidoID, recipient.gradidoID]) > 0) {
|
||||
throw new LogError(
|
||||
@ -88,7 +88,7 @@ export const executeTransaction = async (
|
||||
receivedCallDate,
|
||||
transactionLink,
|
||||
)
|
||||
logger.debug(`calculated balance=${sendBalance?.balance.toString()} decay=${sendBalance?.decay.decay.toString()} lastTransactionId=${sendBalance?.lastTransactionId}`)
|
||||
logger.debug(`calculated Balance=${sendBalance}`)
|
||||
if (!sendBalance) {
|
||||
throw new LogError('User has not enough GDD or amount is < 0', sendBalance)
|
||||
}
|
||||
@ -147,7 +147,7 @@ export const executeTransaction = async (
|
||||
// Save linked transaction id for send
|
||||
transactionSend.linkedTransactionId = transactionReceive.id
|
||||
await queryRunner.manager.update(dbTransaction, { id: transactionSend.id }, transactionSend)
|
||||
logger.debug('send Transaction updated', new TransactionLoggingView(transactionSend).toJSON())
|
||||
logger.debug('send Transaction updated', transactionSend)
|
||||
|
||||
if (transactionLink) {
|
||||
logger.info('transactionLink', transactionLink)
|
||||
@ -161,8 +161,10 @@ export const executeTransaction = async (
|
||||
}
|
||||
|
||||
await queryRunner.commitTransaction()
|
||||
logger.info(`commit Transaction successful...`)
|
||||
|
||||
await EVENT_TRANSACTION_SEND(sender, recipient, transactionSend, transactionSend.amount)
|
||||
|
||||
await EVENT_TRANSACTION_RECEIVE(
|
||||
recipient,
|
||||
sender,
|
||||
@ -184,7 +186,6 @@ export const executeTransaction = async (
|
||||
} finally {
|
||||
await queryRunner.release()
|
||||
}
|
||||
|
||||
await sendTransactionReceivedEmail({
|
||||
firstName: recipient.firstName,
|
||||
lastName: recipient.lastName,
|
||||
|
||||
@ -79,9 +79,11 @@ jest.mock('@/emails/sendEmailVariants', () => {
|
||||
return {
|
||||
__esModule: true,
|
||||
...originalModule,
|
||||
sendAccountActivationEmail: jest.fn(),
|
||||
sendAccountMultiRegistrationEmail: jest.fn(),
|
||||
sendResetPasswordEmail: jest.fn(),
|
||||
sendAccountActivationEmail: jest.fn((a) => originalModule.sendAccountActivationEmail(a)),
|
||||
sendAccountMultiRegistrationEmail: jest.fn((a) =>
|
||||
originalModule.sendAccountMultiRegistrationEmail(a),
|
||||
),
|
||||
sendResetPasswordEmail: jest.fn((a) => originalModule.sendResetPasswordEmail(a)),
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
@ -25,7 +25,7 @@ import {
|
||||
Root,
|
||||
} from 'type-graphql'
|
||||
import { IRestResponse } from 'typed-rest-client'
|
||||
import { EntityNotFoundError, In, Point } from 'typeorm'
|
||||
import { EntityManager, EntityNotFoundError, In, Point } from 'typeorm'
|
||||
import { v4 as uuidv4 } from 'uuid'
|
||||
|
||||
import { UserArgs } from '@arg//UserArgs'
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user