fix(trading): ledger entries table formatting (#3180)
This commit is contained in:
parent
ae54616c1f
commit
e5ebaf02d2
@ -134,6 +134,10 @@ export const LedgerTable = forwardRef<AgGridReact, LedgerEntryProps>(
|
|||||||
headerName={t('Transfer type')}
|
headerName={t('Transfer type')}
|
||||||
field="transferType"
|
field="transferType"
|
||||||
tooltipField="transferType"
|
tooltipField="transferType"
|
||||||
|
filter={SetFilter}
|
||||||
|
filterParams={{
|
||||||
|
set: TransferTypeMapping,
|
||||||
|
}}
|
||||||
valueFormatter={({
|
valueFormatter={({
|
||||||
value,
|
value,
|
||||||
}: VegaValueFormatterParams<LedgerEntry, 'transferType'>) =>
|
}: VegaValueFormatterParams<LedgerEntry, 'transferType'>) =>
|
||||||
@ -147,14 +151,9 @@ export const LedgerTable = forwardRef<AgGridReact, LedgerEntryProps>(
|
|||||||
value,
|
value,
|
||||||
data,
|
data,
|
||||||
}: VegaValueFormatterParams<LedgerEntry, 'quantity'>) => {
|
}: VegaValueFormatterParams<LedgerEntry, 'quantity'>) => {
|
||||||
const marketDecimalPlaces = data?.marketSender?.decimalPlaces;
|
|
||||||
const assetDecimalPlaces = data?.asset?.decimals || 0;
|
const assetDecimalPlaces = data?.asset?.decimals || 0;
|
||||||
return value
|
return value
|
||||||
? addDecimalsFormatNumber(
|
? addDecimalsFormatNumber(value, assetDecimalPlaces)
|
||||||
value,
|
|
||||||
assetDecimalPlaces,
|
|
||||||
marketDecimalPlaces
|
|
||||||
)
|
|
||||||
: value;
|
: value;
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
@ -175,14 +174,9 @@ export const LedgerTable = forwardRef<AgGridReact, LedgerEntryProps>(
|
|||||||
value,
|
value,
|
||||||
data,
|
data,
|
||||||
}: VegaValueFormatterParams<LedgerEntry, 'fromAccountBalance'>) => {
|
}: VegaValueFormatterParams<LedgerEntry, 'fromAccountBalance'>) => {
|
||||||
const marketDecimalPlaces = data?.marketSender?.decimalPlaces;
|
|
||||||
const assetDecimalPlaces = data?.asset?.decimals || 0;
|
const assetDecimalPlaces = data?.asset?.decimals || 0;
|
||||||
return value
|
return value
|
||||||
? addDecimalsFormatNumber(
|
? addDecimalsFormatNumber(value, assetDecimalPlaces)
|
||||||
value,
|
|
||||||
assetDecimalPlaces,
|
|
||||||
marketDecimalPlaces
|
|
||||||
)
|
|
||||||
: value;
|
: value;
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
@ -193,14 +187,9 @@ export const LedgerTable = forwardRef<AgGridReact, LedgerEntryProps>(
|
|||||||
value,
|
value,
|
||||||
data,
|
data,
|
||||||
}: VegaValueFormatterParams<LedgerEntry, 'toAccountBalance'>) => {
|
}: VegaValueFormatterParams<LedgerEntry, 'toAccountBalance'>) => {
|
||||||
const marketDecimalPlaces = data?.marketReceiver?.decimalPlaces;
|
|
||||||
const assetDecimalPlaces = data?.asset?.decimals || 0;
|
const assetDecimalPlaces = data?.asset?.decimals || 0;
|
||||||
return value
|
return value
|
||||||
? addDecimalsFormatNumber(
|
? addDecimalsFormatNumber(value, assetDecimalPlaces)
|
||||||
value,
|
|
||||||
assetDecimalPlaces,
|
|
||||||
marketDecimalPlaces
|
|
||||||
)
|
|
||||||
: value;
|
: value;
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
Loading…
Reference in New Issue
Block a user