style(api): drop non-null assertion in refund amount

Replace `input.amount!` with `input.amount ?? Number(payment.amount)`,
which is behaviour-identical (undefined amount = full refund = full
amount) but satisfies lint/style/noNonNullAssertion.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-27 00:15:41 +03:00
parent 7a8fe5e98e
commit 1b9492ba49

View File

@@ -394,7 +394,7 @@ export class StripeService {
paymentId: payment.id,
userId: payment.userId,
stripeRefundId: refund.id,
amount: isFullRefund ? Number(payment.amount) : input.amount!,
amount: input.amount ?? Number(payment.amount),
isFullRefund,
newStatus,
currency: payment.currency,