mirror of
https://github.com/IT4Change/gradido.git
synced 2026-02-06 09:56:05 +00:00
remove inactive code
This commit is contained in:
parent
d92b9c81e7
commit
29809bf983
@ -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
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user