Fixe calculation of the new balance.

This commit is contained in:
ogerly 2021-12-03 16:46:14 +01:00 committed by elweyn
parent 0da5c3d2c8
commit df393c4ea8

View File

@ -180,7 +180,7 @@ export class AdminResolver {
} else {
newBalance = lastUserTransaction.balance
}
newBalance += Number(parseInt(pendingCreation.amount.toString()) / 10000)
newBalance = Number(newBalance) + Number(parseInt(pendingCreation.amount.toString()) / 10000)
const newUserTransaction = new UserTransaction()
newUserTransaction.userId = pendingCreation.userId