We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f27f1f7 commit 74c73cbCopy full SHA for 74c73cb
src/api/winnings/winnings.service.ts
@@ -73,8 +73,9 @@ export class WinningsService {
73
const hasActiveTaxForm = await this.taxFormRepo.hasActiveTaxForm(
74
body.winnerId,
75
);
76
- const hasPaymentMethod =
77
- await this.paymentMethodRepo.getConnectedPaymentMethod(body.winnerId);
+ const hasConnectedPaymentMethod = Boolean(
+ await this.paymentMethodRepo.getConnectedPaymentMethod(body.winnerId),
78
+ );
79
80
for (const detail of body.details || []) {
81
const paymentModel = {
@@ -90,7 +91,7 @@ export class WinningsService {
90
91
92
paymentModel.net_amount = Prisma.Decimal(detail.grossAmount);
93
paymentModel.payment_status =
- hasPaymentMethod && hasActiveTaxForm
94
+ hasConnectedPaymentMethod && hasActiveTaxForm
95
? PaymentStatus.OWED
96
: PaymentStatus.ON_HOLD;
97
0 commit comments