From b0c9cca51c1419c3e36cbcf4eb244b471f4744b9 Mon Sep 17 00:00:00 2001 From: Linkie Link Date: Wed, 15 Nov 2023 16:27:05 +0100 Subject: [PATCH] v2.0.5 (#636) * fix: fixed the trading chart load * fix: prevent wrapped checkboxes to be double clicked * fix: refactored funding account modal * fix: fixed modal classes * fix: adjusted width classes * fix: fixed the slider masks * listed: TIA and USDT * fix: fixed the slider initial position * env: version update --- package.json | 2 +- src/api/prices/getPrices.ts | 6 +-- src/components/Account/AccountSummary.tsx | 2 +- src/components/Checkbox.tsx | 24 ++++++++---- .../AssetsSelect/useAssetTableColumns.tsx | 1 + .../FundAndWithdrawModalContent.tsx | 18 ++------- src/components/Modals/FundWithdraw/index.tsx | 32 +++++++-------- .../Modals/ModalContentWithSummary.tsx | 39 +++++++++++++------ .../Modals/Vault/VaultModalContent.tsx | 2 +- src/components/Slider/Track.tsx | 5 ++- src/components/Slider/index.tsx | 19 +++++++-- src/components/Trade/TradeChart/index.tsx | 5 ++- src/constants/assets.ts | 37 ++++++++++++++++++ src/store/slices/broadcast.ts | 7 ++-- src/types/interfaces/asset.d.ts | 24 +++++++----- src/utils/broadcast.ts | 2 +- tailwind.config.js | 1 + 17 files changed, 145 insertions(+), 81 deletions(-) diff --git a/package.json b/package.json index 3a7d0b90..8f92dcc6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "mars-v2-frontend", - "version": "2.0.4", + "version": "2.0.5", "private": true, "scripts": { "build": "yarn validate-env && next build", diff --git a/src/api/prices/getPrices.ts b/src/api/prices/getPrices.ts index 9deda03b..8b4f077c 100644 --- a/src/api/prices/getPrices.ts +++ b/src/api/prices/getPrices.ts @@ -1,10 +1,8 @@ import getOraclePrices from 'api/prices/getOraclePrices' import getPoolPrice from 'api/prices/getPoolPrice' import fetchPythPrices from 'api/prices/getPythPrices' -import { ENV } from 'constants/env' import useStore from 'store' import { BNCoin } from 'types/classes/BNCoin' -import { NETWORK } from 'types/enums/network' import { partition } from 'utils/array' import { getAssetsMustHavePriceInfo } from 'utils/assets' @@ -59,13 +57,13 @@ function separateAssetsByPriceSources(assets: Asset[]) { // Only fetch Pyth prices for mainnet const [assetsWithPythPriceFeedId, assetsWithoutPythPriceFeedId] = partition( assets, - (asset) => !!asset.pythPriceFeedId && ENV.NETWORK === NETWORK.MAINNET, + (asset) => !!asset.pythPriceFeedId, ) // Don't get oracle price if it's not mainnet and there is a poolId const [assetsWithOraclePrice, assetsWithoutOraclePrice] = partition( assetsWithoutPythPriceFeedId, - (asset) => (asset.hasOraclePrice && ENV.NETWORK === NETWORK.MAINNET) || !asset.poolId, + (asset) => asset.hasOraclePrice || !asset.poolId, ) const assetsWithPoolId = assetsWithoutOraclePrice.filter((asset) => !!asset.poolId) diff --git a/src/components/Account/AccountSummary.tsx b/src/components/Account/AccountSummary.tsx index d824ec03..e081e18b 100644 --- a/src/components/Account/AccountSummary.tsx +++ b/src/components/Account/AccountSummary.tsx @@ -74,7 +74,7 @@ export default function AccountSummary(props: Props) { if (!props.account) return null return ( -
+
void name: string text?: string + noMouseEvents?: boolean } export default function Checkbox(props: Props) { return ( <> -