style: align multiline ternary operators

This commit is contained in:
2026-09-28 16:37:01 +03:00
committed by ksv741
parent b78c215ff1
commit 183b7f1efd
54 changed files with 986 additions and 982 deletions
@@ -48,9 +48,9 @@ export class BondMarketService {
observe,
);
return {
data: result.values.instrument ?
bondQuote(result.values, result.unavailable, result.observedAt) :
null,
data: result.values.instrument
? bondQuote(result.values, result.unavailable, result.observedAt)
: null,
meta: result.meta,
};
}
@@ -83,8 +83,8 @@ export function bondQuote(
const cleanPrice =
pricePercent !== null &&
nominal &&
decimalFromString(nominal.value).value > ZERO_AMOUNT ?
{
decimalFromString(nominal.value).value > ZERO_AMOUNT
? {
currency: nominal.currency,
value: formatDecimal(
divide(
@@ -96,11 +96,11 @@ export function bondQuote(
PRICE_DECIMAL_PLACES,
),
),
} :
null;
}
: null;
const dirtyPrice =
cleanPrice && aci && aci.currency === cleanPrice.currency ?
{
cleanPrice && aci && aci.currency === cleanPrice.currency
? {
currency: cleanPrice.currency,
value: formatDecimal(
add(
@@ -108,8 +108,8 @@ export function bondQuote(
decimalFromString(aci.value),
),
),
} :
null;
}
: null;
return {
pricePercent,
cleanPrice,
@@ -118,9 +118,9 @@ export function bondQuote(
priceAt,
tradingStatus,
changePercentagePoints:
last?.price && previous?.close ?
formatDecimal(subtract(decimal(last.price), decimal(previous.close))) :
null,
last?.price && previous?.close
? formatDecimal(subtract(decimal(last.price), decimal(previous.close)))
: null,
previousCloseDate: timestamp(previous?.time)?.slice(ISO_DATE_START, ISO_DATE_LENGTH) ?? null,
unavailable,
observedAt,