File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -73,8 +73,9 @@ export class WinningsService {
73
73
const hasActiveTaxForm = await this . taxFormRepo . hasActiveTaxForm (
74
74
body . winnerId ,
75
75
) ;
76
- const hasPaymentMethod =
77
- await this . paymentMethodRepo . getConnectedPaymentMethod ( body . winnerId ) ;
76
+ const hasConnectedPaymentMethod = Boolean (
77
+ await this . paymentMethodRepo . getConnectedPaymentMethod ( body . winnerId ) ,
78
+ ) ;
78
79
79
80
for ( const detail of body . details || [ ] ) {
80
81
const paymentModel = {
@@ -90,7 +91,7 @@ export class WinningsService {
90
91
91
92
paymentModel . net_amount = Prisma . Decimal ( detail . grossAmount ) ;
92
93
paymentModel . payment_status =
93
- hasPaymentMethod && hasActiveTaxForm
94
+ hasConnectedPaymentMethod && hasActiveTaxForm
94
95
? PaymentStatus . OWED
95
96
: PaymentStatus . ON_HOLD ;
96
97
You can’t perform that action at this time.
0 commit comments