Skip to content

Commit d86f537

Browse files
authored
Merge pull request #176 from topcoder-platform/fix-payment-status
Keep payment status
2 parents efd64ee + 1c1e7ec commit d86f537

1 file changed

Lines changed: 1 addition & 7 deletions

File tree

src/api/challenges/challenges.service.ts

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -513,12 +513,6 @@ export class ChallengesService {
513513
);
514514

515515
return payments.map((payment) => {
516-
const paymentStatus =
517-
payment.status ??
518-
(challenge.task?.isTask && payment.currency === PrizeType.USD
519-
? PaymentStatus.ON_HOLD_ADMIN
520-
: undefined);
521-
522516
return {
523517
winnerId: payment.userId.toString(),
524518
type:
@@ -530,7 +524,7 @@ export class ChallengesService {
530524
title: challenge.name,
531525
description: payment.description || challenge.name,
532526
externalId: challenge.id,
533-
...(paymentStatus ? { status: paymentStatus } : {}),
527+
...(payment.status ? { status: payment.status } : {}),
534528
details: [
535529
{
536530
totalAmount: payment.amount,

0 commit comments

Comments
 (0)