diff --git a/src/components/dex/InputPanelItem/index.tsx b/src/components/dex/InputPanelItem/index.tsx index 40b92bb..5ad6bb1 100644 --- a/src/components/dex/InputPanelItem/index.tsx +++ b/src/components/dex/InputPanelItem/index.tsx @@ -197,8 +197,8 @@ function InputPanelItem(props: InputPanelItemProps) { invalid={!!amountState && !amountValid} /> -
0%
100%
diff --git a/src/components/dex/InputPanelItem/styles.module.scss b/src/components/dex/InputPanelItem/styles.module.scss index 446f562..a24daa2 100644 --- a/src/components/dex/InputPanelItem/styles.module.scss +++ b/src/components/dex/InputPanelItem/styles.module.scss @@ -108,6 +108,11 @@ } } +.disabled { + opacity: .5; + pointer-events: none; +} + .applyAlert { display: flex; gap: 20px; @@ -194,4 +199,4 @@ } } } -} +} \ No newline at end of file diff --git a/src/hook/useFilteredData.ts b/src/hook/useFilteredData.ts index d3aa71d..e477fb3 100644 --- a/src/hook/useFilteredData.ts +++ b/src/hook/useFilteredData.ts @@ -14,6 +14,7 @@ const useFilteredData = ({ ordersHistory, ordersBuySell }: useFilteredDataParams const filteredOrdersHistory = ordersHistory ?.filter((e) => (ordersBuySell.code === 'all' ? e : e.type === ordersBuySell.code)) ?.filter((e) => e.user.address !== state.wallet?.address) + ?.filter((e) => parseFloat(e.left.toString()) !== 0) ?.sort((a, b) => { if (ordersBuySell.code === 'buy') { return parseFloat(b.price.toString()) - parseFloat(a.price.toString()); diff --git a/src/utils/takeOrderClick.ts b/src/utils/takeOrderClick.ts index b24844d..e2a081a 100644 --- a/src/utils/takeOrderClick.ts +++ b/src/utils/takeOrderClick.ts @@ -29,7 +29,7 @@ function takeOrderClick({ const e = PageOrderData; const priceStr = notationToString(new Decimal(e.price).toString()) || ''; - const amountStr = notationToString(new Decimal(e.amount).toString()) || ''; + const amountStr = notationToString(new Decimal(e.left).toString()) || ''; const secondCurrencyDP = pairData?.second_currency?.asset_info?.decimal_point || 12; const firstCurrencyDP = pairData?.first_currency?.asset_info?.decimal_point || 12;