codex/broker-account-analytics #41

Merged
ksv741 merged 9 commits from codex/broker-account-analytics into main 2026-06-24 12:09:38 +03:00
Showing only changes of commit 5184d34262 - Show all commits

View File

@ -77,8 +77,13 @@ export class BrokerAnalyticsService {
let totalCoupons = 0; let totalCoupons = 0;
for (const op of operations) { for (const op of operations) {
const payment = JSON.parse(op.payment!); let value = 0;
const value = payment.value ?? 0; try {
const payment = JSON.parse(op.payment!);
value = payment.value ?? 0;
} catch {
continue;
}
if (DEPOSIT_TYPES.has(op.type)) { if (DEPOSIT_TYPES.has(op.type)) {
totalDeposits += value; totalDeposits += value;