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
@@ -43,9 +43,9 @@ export function portfolioStructure(
currencies.set(money.currency, group);
};
for (const position of positions) {
const type = ['BOND', 'STOCK'].includes(position.type) ?
position.type :
'OTHER';
const type = ['BOND', 'STOCK'].includes(position.type)
? position.type
: 'OTHER';
if (position.currentValue) include(type, position.currentValue);
else unvalued.set(type, (unvalued.get(type) ?? INITIAL_UNVALUED_COUNT) + POSITION_INCREMENT);
}
@@ -65,8 +65,8 @@ export function portfolioStructure(
value: formatDecimal(value),
// Rounded to six decimal places using integer arithmetic. Only the
// resulting dimensionless percentage is passed to chart geometry.
sharePercent: canCalculateShares ?
formatDecimal({
sharePercent: canCalculateShares
? formatDecimal({
value:
(value.value *
DECIMAL_RADIX ** BigInt(total.scale - value.scale) *
@@ -74,8 +74,8 @@ export function portfolioStructure(
total.value / ROUNDING_DIVISOR) /
total.value,
scale: SHARE_PERCENT_DECIMAL_PLACES,
}) :
null,
})
: null,
}));
return {
currency,