Skip to content

Commit 07bf3eb

Browse files
committed
Merge branch 'quick-wins' of https://github.com/IsaacCheng9/fairsplit into quick-wins
2 parents 5425527 + 4b2ad91 commit 07bf3eb

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

server/controllers/helpers/index.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,10 @@ exports.simplifyDebts = async function () {
118118
const smallestDebt = minHeapDebt.pop();
119119
const smallestCredit = minHeapCredit.pop();
120120
// Create a new optimised debt.
121-
const transactionAmount = Math.min(smallestDebt.amount, smallestCredit.amount);
121+
const transactionAmount = Math.min(
122+
smallestDebt.amount,
123+
smallestCredit.amount,
124+
);
122125
await optimisedDebtModel.create({
123126
from: smallestDebt.username,
124127
to: smallestCredit.username,

0 commit comments

Comments
 (0)