From 29809bf9839f0852e94cae6530f70609bbf39875 Mon Sep 17 00:00:00 2001 From: clauspeterhuebner Date: Wed, 3 Sep 2025 22:05:36 +0200 Subject: [PATCH] remove inactive code --- .../graphql/resolver/TransactionResolver.ts | 74 ------------------- 1 file changed, 74 deletions(-) diff --git a/backend/src/graphql/resolver/TransactionResolver.ts b/backend/src/graphql/resolver/TransactionResolver.ts index 2ef7b69ff..c9d68de35 100644 --- a/backend/src/graphql/resolver/TransactionResolver.ts +++ b/backend/src/graphql/resolver/TransactionResolver.ts @@ -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 }