codex/broker-account-analytics #41
@ -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;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user