From b0a54be408bc7933f0f5b249003d953a3388d492 Mon Sep 17 00:00:00 2001 From: Edd Date: Wed, 30 Aug 2023 10:39:49 +0200 Subject: [PATCH] fix(explorer): format iceberg size according to market (#4612) --- .../txs/details/order/tx-order-iceberg.tsx | 22 ++++++++++++++++--- .../app/components/txs/details/tx-order.tsx | 6 ++++- 2 files changed, 24 insertions(+), 4 deletions(-) diff --git a/apps/explorer/src/app/components/txs/details/order/tx-order-iceberg.tsx b/apps/explorer/src/app/components/txs/details/order/tx-order-iceberg.tsx index d9e3bea69..65738a4ae 100644 --- a/apps/explorer/src/app/components/txs/details/order/tx-order-iceberg.tsx +++ b/apps/explorer/src/app/components/txs/details/order/tx-order-iceberg.tsx @@ -1,10 +1,12 @@ import { t } from '@vegaprotocol/i18n'; import type { components } from '../../../../../types/explorer'; import { Tooltip } from '@vegaprotocol/ui-toolkit'; +import SizeInMarket from '../../../size-in-market/size-in-market'; export interface TxDetailsOrderIcebergDetailsProps { iceberg: components['schemas']['v1IcebergOpts']; size: components['schemas']['v1OrderSubmission']['size']; + marketId?: string; } /** @@ -28,6 +30,7 @@ export interface TxDetailsOrderIcebergDetailsProps { export const TxOrderIcebergDetails = ({ iceberg, size, + marketId, }: TxDetailsOrderIcebergDetailsProps) => { return (
- {iceberg.minimumVisibleSize || '-'} + {marketId ? ( + + ) : ( + iceberg.minimumVisibleSize + )} - {size} + + {marketId ? : size} + - {iceberg.peakSize || '-'} + {marketId ? ( + + ) : ( + iceberg.peakSize + )}
diff --git a/apps/explorer/src/app/components/txs/details/tx-order.tsx b/apps/explorer/src/app/components/txs/details/tx-order.tsx index 9009a55a4..6d48abbd0 100644 --- a/apps/explorer/src/app/components/txs/details/tx-order.tsx +++ b/apps/explorer/src/app/components/txs/details/tx-order.tsx @@ -81,7 +81,11 @@ export const TxDetailsOrder = ({ {t('Iceberg details')} - + ) : null}