fix(trading): amend market list settlement asset column getter (#3487)

This commit is contained in:
Bartłomiej Głownia 2023-04-21 16:08:41 +02:00 committed by GitHub
parent e1f60446f0
commit 4d5b7cf5e7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -176,14 +176,16 @@ export const MarketListTable = forwardRef<
/> />
<AgGridColumn <AgGridColumn
headerName={t('Settlement asset')} headerName={t('Settlement asset')}
field="tradableInstrument.instrument.product.settlementAsset" field="tradableInstrument.instrument.product.settlementAsset.symbol"
cellRenderer={({ cellRenderer={({
value, data,
}: VegaICellRendererParams< }: VegaICellRendererParams<
MarketMaybeWithData, MarketMaybeWithData,
'tradableInstrument.instrument.product.settlementAsset' 'tradableInstrument.instrument.product.settlementAsset.symbol'
>) => >) => {
value ? ( const value =
data?.tradableInstrument.instrument.product.settlementAsset;
return value ? (
<ButtonLink <ButtonLink
onClick={(e) => { onClick={(e) => {
openAssetDetailsDialog(value.id, e.target as HTMLElement); openAssetDetailsDialog(value.id, e.target as HTMLElement);
@ -193,8 +195,8 @@ export const MarketListTable = forwardRef<
</ButtonLink> </ButtonLink>
) : ( ) : (
'' ''
) );
} }}
/> />
<AgGridColumn headerName={t('Market ID')} field="id" /> <AgGridColumn headerName={t('Market ID')} field="id" />
</AgGrid> </AgGrid>