Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions src/api/challenges/challenges.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,6 @@ export class ChallengesService {
challenge: Challenge,
reviewers: ChallengeResource[],
): Promise<PaymentPayload[]> {
// generate placement payments
const placementPrizes = orderBy(
find(challenge.prizeSets, { type: 'PLACEMENT' })?.prizes,
'value',
Expand Down Expand Up @@ -206,7 +205,7 @@ export class ChallengesService {
return {
handle: reviewer.memberHandle,
userId: reviewer.memberId.toString(),
amount: Math.round(
amount: Math.ceil(

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[❗❗ correctness]
Using Math.ceil instead of Math.round changes the behavior of the payment calculation by always rounding up. Ensure this change aligns with the intended business logic, as it could result in higher payments than previously calculated.

(challengeReviewer.fixedAmount ?? 0) +
(challengeReviewer.baseCoefficient ?? 0) * firstPlacePrize +
(challengeReviewer.incrementalCoefficient ?? 0) *
Expand Down