style: align multiline ternary operators
This commit is contained in:
@@ -61,14 +61,14 @@ export function mapBrokerageOperation(
|
||||
logoName: null,
|
||||
payment: money(operation.payment),
|
||||
quantity:
|
||||
(operationCategory(operation.type) === 'trade' ?
|
||||
operation.quantityDone :
|
||||
operation.quantity) === undefined ?
|
||||
null :
|
||||
String(
|
||||
operationCategory(operation.type) === 'trade' ?
|
||||
operation.quantityDone :
|
||||
operation.quantity,
|
||||
(operationCategory(operation.type) === 'trade'
|
||||
? operation.quantityDone
|
||||
: operation.quantity) === undefined
|
||||
? null
|
||||
: String(
|
||||
operationCategory(operation.type) === 'trade'
|
||||
? operation.quantityDone
|
||||
: operation.quantity,
|
||||
),
|
||||
price: money(operation.price),
|
||||
accruedInterest: money(operation.accruedInt),
|
||||
@@ -82,9 +82,9 @@ function text(value: string | undefined): null | string {
|
||||
|
||||
function money(value: TbankMoney | undefined) {
|
||||
const currency = value?.currency?.trim().toUpperCase();
|
||||
return currency && value ?
|
||||
{ currency, value: formatDecimal(decimal(value)) } :
|
||||
null;
|
||||
return currency && value
|
||||
? { currency, value: formatDecimal(decimal(value)) }
|
||||
: null;
|
||||
}
|
||||
|
||||
export function operationTimestamp(
|
||||
|
||||
Reference in New Issue
Block a user