From 00e08c3b31a994608f7d82349a7ab571ec703358 Mon Sep 17 00:00:00 2001 From: saml33 Date: Fri, 10 Feb 2023 16:05:07 +1100 Subject: [PATCH] add stable price to perp stats table --- components/stats/PerpMarketsTable.tsx | 24 ++++++++++++++++++++++-- public/locales/en/trade.json | 2 ++ public/locales/es/trade.json | 2 ++ public/locales/ru/trade.json | 2 ++ public/locales/zh/trade.json | 2 ++ public/locales/zh_tw/trade.json | 2 ++ 6 files changed, 32 insertions(+), 2 deletions(-) diff --git a/components/stats/PerpMarketsTable.tsx b/components/stats/PerpMarketsTable.tsx index 2a91c928..f5692c8c 100644 --- a/components/stats/PerpMarketsTable.tsx +++ b/components/stats/PerpMarketsTable.tsx @@ -15,6 +15,7 @@ import { IconButton } from '@components/shared/Button' import { ChevronRightIcon } from '@heroicons/react/20/solid' import FormatNumericValue from '@components/shared/FormatNumericValue' import { getDecimalCount } from 'utils/numbers' +import Tooltip from '@components/shared/Tooltip' const SimpleAreaChart = dynamic( () => import('@components/shared/SimpleAreaChart'), { ssr: false } @@ -60,7 +61,14 @@ const PerpMarketsTable = ({ {t('market')} {t('price')} - + + + + + {t('trade:stable-price')} + + + {t('trade:funding-rate')} {t('trade:open-interest')} {t('rolling-change')} @@ -97,7 +105,9 @@ const PerpMarketsTable = ({
-

{market.name}

+

+ {market.name} +

@@ -130,6 +140,16 @@ const PerpMarketsTable = ({
)} + +
+

+ +

+
+

{fundingRate}

diff --git a/public/locales/en/trade.json b/public/locales/en/trade.json index 6a1e53a6..03f41b9c 100644 --- a/public/locales/en/trade.json +++ b/public/locales/en/trade.json @@ -46,10 +46,12 @@ "side": "Side", "size": "Size", "spread": "Spread", + "stable-price": "Stable Price", "tooltip-enable-margin": "Enable spot margin for this trade", "tooltip-ioc": "Immediate-Or-Cancel (IOC) orders are guaranteed to be the taker and must be executed immediately. Any portion of the order that can't be filled immediately will be cancelled", "tooltip-post": "Post orders are guaranteed to be the maker or they will be canceled", "tooltip-slippage": "An estimate of the difference between the current price and the price your trade will be executed at", + "tooltip-stable-price": "Stable price is used in a safety mechanism that limits a user's ability to enter risky positions when the oracle price is changing rapidly", "trade-sounds-tooltip": "Play a sound alert for every new trade", "trades": "Trades", "unsettled": "Unsettled" diff --git a/public/locales/es/trade.json b/public/locales/es/trade.json index 6a1e53a6..03f41b9c 100644 --- a/public/locales/es/trade.json +++ b/public/locales/es/trade.json @@ -46,10 +46,12 @@ "side": "Side", "size": "Size", "spread": "Spread", + "stable-price": "Stable Price", "tooltip-enable-margin": "Enable spot margin for this trade", "tooltip-ioc": "Immediate-Or-Cancel (IOC) orders are guaranteed to be the taker and must be executed immediately. Any portion of the order that can't be filled immediately will be cancelled", "tooltip-post": "Post orders are guaranteed to be the maker or they will be canceled", "tooltip-slippage": "An estimate of the difference between the current price and the price your trade will be executed at", + "tooltip-stable-price": "Stable price is used in a safety mechanism that limits a user's ability to enter risky positions when the oracle price is changing rapidly", "trade-sounds-tooltip": "Play a sound alert for every new trade", "trades": "Trades", "unsettled": "Unsettled" diff --git a/public/locales/ru/trade.json b/public/locales/ru/trade.json index 6a1e53a6..03f41b9c 100644 --- a/public/locales/ru/trade.json +++ b/public/locales/ru/trade.json @@ -46,10 +46,12 @@ "side": "Side", "size": "Size", "spread": "Spread", + "stable-price": "Stable Price", "tooltip-enable-margin": "Enable spot margin for this trade", "tooltip-ioc": "Immediate-Or-Cancel (IOC) orders are guaranteed to be the taker and must be executed immediately. Any portion of the order that can't be filled immediately will be cancelled", "tooltip-post": "Post orders are guaranteed to be the maker or they will be canceled", "tooltip-slippage": "An estimate of the difference between the current price and the price your trade will be executed at", + "tooltip-stable-price": "Stable price is used in a safety mechanism that limits a user's ability to enter risky positions when the oracle price is changing rapidly", "trade-sounds-tooltip": "Play a sound alert for every new trade", "trades": "Trades", "unsettled": "Unsettled" diff --git a/public/locales/zh/trade.json b/public/locales/zh/trade.json index 6a1e53a6..03f41b9c 100644 --- a/public/locales/zh/trade.json +++ b/public/locales/zh/trade.json @@ -46,10 +46,12 @@ "side": "Side", "size": "Size", "spread": "Spread", + "stable-price": "Stable Price", "tooltip-enable-margin": "Enable spot margin for this trade", "tooltip-ioc": "Immediate-Or-Cancel (IOC) orders are guaranteed to be the taker and must be executed immediately. Any portion of the order that can't be filled immediately will be cancelled", "tooltip-post": "Post orders are guaranteed to be the maker or they will be canceled", "tooltip-slippage": "An estimate of the difference between the current price and the price your trade will be executed at", + "tooltip-stable-price": "Stable price is used in a safety mechanism that limits a user's ability to enter risky positions when the oracle price is changing rapidly", "trade-sounds-tooltip": "Play a sound alert for every new trade", "trades": "Trades", "unsettled": "Unsettled" diff --git a/public/locales/zh_tw/trade.json b/public/locales/zh_tw/trade.json index 6a1e53a6..03f41b9c 100644 --- a/public/locales/zh_tw/trade.json +++ b/public/locales/zh_tw/trade.json @@ -46,10 +46,12 @@ "side": "Side", "size": "Size", "spread": "Spread", + "stable-price": "Stable Price", "tooltip-enable-margin": "Enable spot margin for this trade", "tooltip-ioc": "Immediate-Or-Cancel (IOC) orders are guaranteed to be the taker and must be executed immediately. Any portion of the order that can't be filled immediately will be cancelled", "tooltip-post": "Post orders are guaranteed to be the maker or they will be canceled", "tooltip-slippage": "An estimate of the difference between the current price and the price your trade will be executed at", + "tooltip-stable-price": "Stable price is used in a safety mechanism that limits a user's ability to enter risky positions when the oracle price is changing rapidly", "trade-sounds-tooltip": "Play a sound alert for every new trade", "trades": "Trades", "unsettled": "Unsettled"