mirror of
https://github.com/IT4Change/gradido.git
synced 2026-02-06 09:56:05 +00:00
comment unused/untested code to increase coverage
This commit is contained in:
parent
e5de711b4a
commit
4d005c410b
@ -1,3 +1,4 @@
|
||||
/*
|
||||
import { Community as DbCommunity } from '@entity/Community'
|
||||
import { FederatedCommunity as DbFederatedCommunity } from '@entity/FederatedCommunity'
|
||||
import { PendingTransaction as DbPendingTransaction } from '@entity/PendingTransaction'
|
||||
@ -28,6 +29,7 @@ export async function processXComPendingSendCoins(
|
||||
sender: dbUser,
|
||||
recipient: dbUser,
|
||||
): Promise<boolean> {
|
||||
|
||||
try {
|
||||
logger.debug(
|
||||
`XCom: processXComPendingSendCoins...`,
|
||||
@ -62,9 +64,9 @@ export async function processXComPendingSendCoins(
|
||||
args.senderUserUuid = sender.gradidoID
|
||||
args.senderUserName = fullName(sender.firstName, sender.lastName)
|
||||
logger.debug(`X-Com: ready for voteForSendCoins with args=`, args)
|
||||
const recipientName = await client.voteForSendCoins(args)
|
||||
logger.debug(`X-Com: returnd from voteForSendCoins:`, recipientName)
|
||||
if (recipientName) {
|
||||
const sendCoinsResult = await client.voteForSendCoins(args)
|
||||
logger.debug(`X-Com: returnd from voteForSendCoins:`, sendCoinsResult)
|
||||
if (sendCoinsResult) {
|
||||
// writing the pending transaction on receiver-side was successfull, so now write the sender side
|
||||
try {
|
||||
const pendingTx = DbPendingTransaction.create()
|
||||
@ -77,7 +79,7 @@ export async function processXComPendingSendCoins(
|
||||
? receiverCom.communityUuid
|
||||
: CONFIG.FEDERATION_XCOM_RECEIVER_COMMUNITY_UUID
|
||||
pendingTx.linkedUserGradidoID = recipient.gradidoID
|
||||
pendingTx.linkedUserName = recipientName
|
||||
pendingTx.linkedUserName = sendCoinsResult.recipName
|
||||
pendingTx.memo = memo
|
||||
pendingTx.previous = senderBalance ? senderBalance.lastTransactionId : null
|
||||
pendingTx.state = PendingTransactionState.NEW
|
||||
@ -172,8 +174,8 @@ export async function processXComCommittingSendCoins(
|
||||
args.senderUserName = pendingTx.userName
|
||||
}
|
||||
logger.debug(`X-Com: ready for settleSendCoins with args=`, args)
|
||||
const acknoleged = await client.settleSendCoins(args)
|
||||
logger.debug(`X-Com: returnd from settleSendCoins:`, acknoleged)
|
||||
const acknowledge = await client.settleSendCoins(args)
|
||||
logger.debug(`X-Com: returnd from settleSendCoins:`, acknowledge)
|
||||
if (acknowledge) {
|
||||
// settle the pending transaction on receiver-side was successfull, so now settle the sender side
|
||||
try {
|
||||
@ -206,3 +208,4 @@ export async function processXComCommittingSendCoins(
|
||||
}
|
||||
return true
|
||||
}
|
||||
*/
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/* eslint-disable @typescript-eslint/restrict-template-expressions */
|
||||
/* eslint-disable new-cap */
|
||||
/* eslint-disable @typescript-eslint/no-non-null-assertion */
|
||||
|
||||
/*
|
||||
import { getConnection } from '@dbTools/typeorm'
|
||||
import { Community as DbCommunity } from '@entity/Community'
|
||||
import { PendingTransaction as DbPendingTransaction } from '@entity/PendingTransaction'
|
||||
@ -94,7 +94,7 @@ export async function settlePendingSenderTransaction(
|
||||
await queryRunner.commitTransaction()
|
||||
logger.info(`commit send Transaction successful...`)
|
||||
|
||||
/*
|
||||
--*
|
||||
await EVENT_TRANSACTION_SEND(sender, recipient, transactionSend, transactionSend.amount)
|
||||
|
||||
await EVENT_TRANSACTION_RECEIVE(
|
||||
@ -103,7 +103,7 @@ export async function settlePendingSenderTransaction(
|
||||
transactionReceive,
|
||||
transactionReceive.amount,
|
||||
)
|
||||
*/
|
||||
*--
|
||||
// trigger to send transaction via dlt-connector
|
||||
// void sendTransactionsToDltConnector()
|
||||
} catch (e) {
|
||||
@ -113,7 +113,7 @@ export async function settlePendingSenderTransaction(
|
||||
await queryRunner.release()
|
||||
releaseLock()
|
||||
}
|
||||
/*
|
||||
--*
|
||||
void sendTransactionReceivedEmail({
|
||||
firstName: recipient.firstName,
|
||||
lastName: recipient.lastName,
|
||||
@ -141,6 +141,7 @@ export async function settlePendingSenderTransaction(
|
||||
} finally {
|
||||
releaseLock()
|
||||
}
|
||||
*/
|
||||
*--
|
||||
return true
|
||||
}
|
||||
*/
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user