use enum for comparison instead of a number

This commit is contained in:
Ulf Gebhardt 2021-10-02 12:35:31 +02:00
parent 9953945bb5
commit a4744dd588
No known key found for this signature in database
GPG Key ID: 81308EFE29ABFEBD

View File

@ -50,7 +50,7 @@ async function calculateAndAddDecayTransactions(
const transactionIndiced: dbTransaction[] = []
transactions.forEach((transaction: dbTransaction) => {
transactionIndiced[transaction.id] = transaction
if (transaction.transactionTypeId === 2) {
if (transaction.transactionTypeId === TransactionTypeId.SEND) {
involvedUserIds.push(transaction.transactionSendCoin.userId)
involvedUserIds.push(transaction.transactionSendCoin.recipiantUserId)
}
@ -97,7 +97,7 @@ async function calculateAndAddDecayTransactions(
}
}
// sender or receiver when user has sended money
// sender or receiver when user has sent money
// group name if creation
// type: gesendet / empfangen / geschöpft
// transaktion nr / id