From d715fd9c2fca31b44c362eae7ea48ae859486172 Mon Sep 17 00:00:00 2001 From: Ulf Gebhardt Date: Mon, 21 Feb 2022 01:49:53 +0100 Subject: [PATCH] also set user.id as involved User on a creation --- backend/src/graphql/resolver/TransactionResolver.ts | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/backend/src/graphql/resolver/TransactionResolver.ts b/backend/src/graphql/resolver/TransactionResolver.ts index a490cec8a..b705694fe 100644 --- a/backend/src/graphql/resolver/TransactionResolver.ts +++ b/backend/src/graphql/resolver/TransactionResolver.ts @@ -48,12 +48,11 @@ async function calculateAndAddDecayTransactions( }) const transactions = await dbTransaction.find({ where: { id: In(transactionIds) } }) - const transactionIndiced: dbTransaction[] = [] transactions.forEach((transaction: dbTransaction) => { transactionIndiced[transaction.id] = transaction + involvedUserIds.push(transaction.userId) if (transaction.transactionTypeId === TransactionTypeId.SEND) { - involvedUserIds.push(transaction.userId) involvedUserIds.push(transaction.sendReceiverUserId!) // TODO ensure not null properly } }) @@ -146,7 +145,6 @@ async function calculateAndAddDecayTransactions( finalTransactions.push(decayTransaction) } } - return finalTransactions } @@ -233,7 +231,6 @@ export class TransactionResolver { const user = userId ? await userRepository.findOneOrFail({ id: userId }, { withDeleted: true }) : await userRepository.findByPubkeyHex(context.pubKey) - let limit = pageSize let offset = 0 let skipFirstTransaction = false