style: align multiline ternary operators
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user