remove inactive code

This commit is contained in:
clauspeterhuebner 2025-09-03 22:05:36 +02:00
parent d92b9c81e7
commit 29809bf983

View File

@ -467,80 +467,6 @@ export class TransactionResolver {
amount.valueOf(),
memo,
)
/*
// processing a x-community sendCoins
logger.info('X-Com: processing a x-community transaction...')
if (!CONFIG.FEDERATION_XCOM_SENDCOINS_ENABLED) {
throw new LogError('X-Community sendCoins disabled per configuration!')
}
const recipCom = await getCommunityByIdentifier(recipientCommunityIdentifier)
logger.debug('recipient community: ', recipCom?.id)
if (recipCom === null) {
throw new LogError(
`no recipient community found for identifier: ${recipientCommunityIdentifier}`,
)
}
if (recipCom !== null && recipCom.authenticatedAt === null) {
throw new LogError('recipient community is connected, but still not authenticated yet!')
}
let pendingResult: SendCoinsResponseJwtPayloadType | null = null
let committingResult: SendCoinsResult
const creationDate = new Date()
try {
pendingResult = await processXComPendingSendCoins(
recipCom,
homeCom,
creationDate,
amount,
memo,
senderUser,
recipientIdentifier,
)
logger.debug('processXComPendingSendCoins result: ', pendingResult)
if (pendingResult && pendingResult.vote && pendingResult.recipGradidoID) {
logger.debug('vor processXComCommittingSendCoins... ')
committingResult = await processXComCommittingSendCoins(
recipCom,
homeCom,
creationDate,
amount,
memo,
senderUser,
pendingResult,
)
logger.debug('processXComCommittingSendCoins result: ', committingResult)
if (!committingResult.vote) {
logger.fatal('FATAL ERROR: on processXComCommittingSendCoins for', committingResult)
throw new LogError(
'FATAL ERROR: on processXComCommittingSendCoins with ',
recipientCommunityIdentifier,
recipientIdentifier,
amount.toString(),
memo,
)
}
// after successful x-com-tx store the recipient as foreign user
logger.debug('store recipient as foreign user...')
if (await storeForeignUser(recipCom, committingResult)) {
logger.info(
'X-Com: new foreign user inserted successfully...',
recipCom.communityUuid,
committingResult.recipGradidoID,
)
}
}
} catch (err) {
throw new LogError(
'ERROR: on processXComCommittingSendCoins with ',
recipientCommunityIdentifier,
recipientIdentifier,
amount.toString(),
memo,
err,
)
}
*/
}
return true
}