Skip to content

Commit 74c73cb

Browse files
committed
rename variables
1 parent f27f1f7 commit 74c73cb

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/api/winnings/winnings.service.ts

+4-3
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,9 @@ export class WinningsService {
7373
const hasActiveTaxForm = await this.taxFormRepo.hasActiveTaxForm(
7474
body.winnerId,
7575
);
76-
const hasPaymentMethod =
77-
await this.paymentMethodRepo.getConnectedPaymentMethod(body.winnerId);
76+
const hasConnectedPaymentMethod = Boolean(
77+
await this.paymentMethodRepo.getConnectedPaymentMethod(body.winnerId),
78+
);
7879

7980
for (const detail of body.details || []) {
8081
const paymentModel = {
@@ -90,7 +91,7 @@ export class WinningsService {
9091

9192
paymentModel.net_amount = Prisma.Decimal(detail.grossAmount);
9293
paymentModel.payment_status =
93-
hasPaymentMethod && hasActiveTaxForm
94+
hasConnectedPaymentMethod && hasActiveTaxForm
9495
? PaymentStatus.OWED
9596
: PaymentStatus.ON_HOLD;
9697

0 commit comments

Comments
 (0)