diff --git a/src/App/App.scss b/src/App/App.scss index 7e50d614e0..8b31282a30 100644 --- a/src/App/App.scss +++ b/src/App/App.scss @@ -421,6 +421,10 @@ button.App-connect-wallet:hover { } } +.App-card-divider + .App-card-divider { + display: none +} + .line-divider { height: 1px; background: var(--color-slate-700); diff --git a/src/components/Button/Button.scss b/src/components/Button/Button.scss index 73ea6ca0bc..6550509c0e 100644 --- a/src/components/Button/Button.scss +++ b/src/components/Button/Button.scss @@ -90,6 +90,16 @@ } } + &.link { + color: var(--color-gray-300); + text-decoration: underline; + padding: 0; + + &.disabled { + text-decoration: none;; + } + } + &.disabled, &:disabled { box-shadow: none; diff --git a/src/components/Button/Button.tsx b/src/components/Button/Button.tsx index 04f1f44a95..9cf1f8432f 100644 --- a/src/components/Button/Button.tsx +++ b/src/components/Button/Button.tsx @@ -1,11 +1,11 @@ -import { HTMLProps, MouseEvent as ReactMouseEvent, ReactNode, RefObject, useMemo } from "react"; import cx from "classnames"; +import { HTMLProps, MouseEvent as ReactMouseEvent, ReactNode, RefObject, useMemo } from "react"; import ButtonLink from "./ButtonLink"; import "./Button.scss"; -type ButtonVariant = "primary" | "primary-action" | "secondary"; +type ButtonVariant = "primary" | "primary-action" | "secondary" | "link"; type ButtonProps = HTMLProps & { children: ReactNode; diff --git a/src/components/Exchange/ExchangeInfo.tsx b/src/components/Exchange/ExchangeInfo.tsx index 402930f591..e55ab007fd 100644 --- a/src/components/Exchange/ExchangeInfo.tsx +++ b/src/components/Exchange/ExchangeInfo.tsx @@ -1,4 +1,5 @@ import React, { ReactNode } from "react"; +import ExchangeInfoRow from "./ExchangeInfoRow"; interface ExchangeInfoProps { children?: ReactNode; @@ -56,5 +57,6 @@ function isExchangeInfoGroup(child: ReactNode) { } ExchangeInfo.Group = ExchangeInfoGroup; +ExchangeInfo.Row = ExchangeInfoRow; export { ExchangeInfo }; diff --git a/src/components/Exchange/ExchangeInfoRow.tsx b/src/components/Exchange/ExchangeInfoRow.tsx index 2e566b432f..11961972e9 100644 --- a/src/components/Exchange/ExchangeInfoRow.tsx +++ b/src/components/Exchange/ExchangeInfoRow.tsx @@ -7,13 +7,17 @@ type Props = PropsWithChildren<{ isTop?: boolean; isWarning?: boolean; className?: string; + onClick?: () => void; }>; export default function ExchangeInfoRow(props: Props) { - const { label, children, value, isTop, isWarning, className } = props; + const { label, children, value, isTop, isWarning, className, onClick } = props; return ( -
+
{label}
{children || value}
diff --git a/src/components/PercentageInput/PercentageInput.tsx b/src/components/PercentageInput/PercentageInput.tsx index cf44cebf02..d59b9a7a81 100644 --- a/src/components/PercentageInput/PercentageInput.tsx +++ b/src/components/PercentageInput/PercentageInput.tsx @@ -8,6 +8,7 @@ import type { TooltipPosition } from "components/Tooltip/Tooltip"; import TooltipWithPortal from "components/Tooltip/TooltipWithPortal"; import "./PercentageInput.scss"; +import { useLatest } from "react-use"; export const NUMBER_WITH_TWO_DECIMALS = /^\d+(\.\d{0,2})?$/; // 0.00 ~ 99.99 @@ -78,25 +79,30 @@ export default function PercentageInput({ } } + const latestInputValue = useLatest(inputValue); + useEffect(() => { if (value === undefined) { - if (inputValue !== "") { + if (latestInputValue.current !== "") { setInputValue(""); } return; } + const valueText = getValueText(value); + const defaultValueText = getValueText(defaultValue); + if ( // When the value is changed from outside we want to keep input empty // if the value is the same as the default value as it means the user // just cleared the input - Number.parseFloat(inputValue) !== Number.parseFloat(getValueText(value)) && - !(getValueText(value) === getValueText(defaultValue) && inputValue === "") + Number.parseFloat(latestInputValue.current) !== Number.parseFloat(valueText) && + !(valueText === defaultValueText && latestInputValue.current === "") ) { - setInputValue(getValueText(value)); + setInputValue(valueText); } - }, [defaultValue, inputValue, value]); + }, [defaultValue, value, latestInputValue]); const error = useMemo(() => { const parsedValue = Math.round(Number.parseFloat(inputValue) * 100); @@ -117,6 +123,14 @@ export default function PercentageInput({ const shouldShowPanel = isPanelVisible && Boolean(suggestions.length); + const onSelectSuggestion = useCallback( + (suggestion: number) => () => { + onChange(suggestion * 100); + setIsPanelVisible(false); + }, + [onChange, setIsPanelVisible] + ); + return (
{suggestions.map((slippage) => ( -
  • { - setInputValue(String(slippage)); - onChange(slippage * 100); - setIsPanelVisible(false); - }} - > +
  • {slippage}%
  • ))} diff --git a/src/components/SubaccountNavigationButton/SubaccountNavigationButton.scss b/src/components/SubaccountNavigationButton/SubaccountNavigationButton.scss deleted file mode 100644 index 539f1bec53..0000000000 --- a/src/components/SubaccountNavigationButton/SubaccountNavigationButton.scss +++ /dev/null @@ -1,4 +0,0 @@ -.SubaccountNavigationButton { - margin-top: 2rem; - margin-bottom: 2rem; -} diff --git a/src/components/SubaccountNavigationButton/SubaccountNavigationButton.tsx b/src/components/SubaccountNavigationButton/SubaccountNavigationButton.tsx deleted file mode 100644 index ae3479d2d9..0000000000 --- a/src/components/SubaccountNavigationButton/SubaccountNavigationButton.tsx +++ /dev/null @@ -1,163 +0,0 @@ -import { Trans } from "@lingui/macro"; -import ExternalLink from "components/ExternalLink/ExternalLink"; -import { NavigationButton } from "components/NavigationButton/NavigationButton"; -import TooltipWithPortal from "components/Tooltip/TooltipWithPortal"; -import { getNativeToken, getWrappedToken } from "config/tokens"; -import { - useIsSubaccountActive, - useSubaccountActionCounts, - useSubaccountInsufficientFunds, - useSubaccountModalOpen, -} from "context/SubaccountContext/SubaccountContext"; -import { SUBACCOUNT_DOCS_URL } from "domain/synthetics/subaccount/constants"; -import { useChainId } from "lib/chains"; -import cx from "classnames"; -import { useLocalStorageSerializeKey } from "lib/localStorage"; -import { ReactNode, memo, useCallback } from "react"; -import "./SubaccountNavigationButton.scss"; -import { - ONE_CLICK_TRADING_NATIVE_TOKEN_WARN_HIDDEN, - ONE_CLICK_TRADING_WRAP_OR_UNWRAP_WARN_HIDDEN, - ONE_CLICK_TRADING_OFFER_HIDDEN, -} from "config/localStorage"; -import { TradeFlags } from "domain/synthetics/trade"; - -export const SubaccountNavigationButton = memo( - ({ - closeConfirmationBox, - executionFee, - isNativeToken, - isWrapOrUnwrap, - tradeFlags, - className, - requiredActions = 0, - }: { - closeConfirmationBox: () => void; - executionFee: bigint | undefined; - isNativeToken?: boolean; - isWrapOrUnwrap?: boolean; - tradeFlags: TradeFlags | undefined; - className?: string; - requiredActions?: number; - }) => { - const isSubaccountActive = useIsSubaccountActive(); - const [, setModalOpen] = useSubaccountModalOpen(); - const { chainId } = useChainId(); - - const insufficientFunds = useSubaccountInsufficientFunds(executionFee); - - const jumpToSubaccount = useCallback(() => { - closeConfirmationBox(); - setModalOpen(true); - }, [closeConfirmationBox, setModalOpen]); - - const [offerButtonHidden, setOfferButtonHidden] = useLocalStorageSerializeKey( - ONE_CLICK_TRADING_OFFER_HIDDEN, - false - ); - const [nativeTokenWarningHidden, setNativeTokenWarningHidden] = useLocalStorageSerializeKey( - ONE_CLICK_TRADING_NATIVE_TOKEN_WARN_HIDDEN, - false - ); - const [wrapOrUnwrapWarningHidden, setWrapOrUnwrapWarningHidden] = useLocalStorageSerializeKey( - ONE_CLICK_TRADING_WRAP_OR_UNWRAP_WARN_HIDDEN, - false - ); - - const handleCloseOfferClick = useCallback(() => { - setOfferButtonHidden(true); - }, [setOfferButtonHidden]); - - const handleCloseNativeTokenWarningClick = useCallback(() => { - setNativeTokenWarningHidden(true); - }, [setNativeTokenWarningHidden]); - - const handleCloseWrapOrUnwrapWarningClick = useCallback(() => { - setWrapOrUnwrapWarningHidden(true); - }, [setWrapOrUnwrapWarningHidden]); - - const { remaining } = useSubaccountActionCounts(); - - const shouldShowInsufficientFundsButton = isSubaccountActive && insufficientFunds && !isNativeToken; - const shouldShowOfferButton = !isSubaccountActive && !offerButtonHidden && !isNativeToken; - const shouldShowAllowedActionsWarning = - isSubaccountActive && (remaining === 0n || remaining < requiredActions) && !isNativeToken; - const shouldShowWrapOrUnwrapWarning = - !tradeFlags?.isTrigger && isSubaccountActive && !wrapOrUnwrapWarningHidden && isWrapOrUnwrap; - const shouldShowNativeTokenWarning = - !tradeFlags?.isTrigger && isSubaccountActive && !nativeTokenWarningHidden && isNativeToken; - - let content: ReactNode = null; - let onCloseClick: null | (() => void) = null; - - const renderTooltipContent = useCallback(() => { - return ( -
    e.stopPropagation()}> - - Reduce wallet signing popups with One-Click Trading. This option is also available through the Wallet menu - in the top right. Read more. - -
    - ); - }, []); - - let clickable = true; - - if (shouldShowWrapOrUnwrapWarning) { - const nativeToken = getNativeToken(chainId); - clickable = false; - onCloseClick = handleCloseWrapOrUnwrapWarningClick; - content = ( - One-Click Trading is not available for wrapping or unwrapping native token {nativeToken.symbol}. - ); - } else if (shouldShowNativeTokenWarning) { - const wrappedToken = getWrappedToken(chainId); - const nativeToken = getNativeToken(chainId); - clickable = false; - onCloseClick = handleCloseNativeTokenWarningClick; - content = ( - - One-Click Trading is not available using network's native token {nativeToken.symbol}. Consider using{" "} - {wrappedToken.symbol} instead. - - ); - } else if (shouldShowAllowedActionsWarning) { - content = ( - - The previously authorized maximum number of Actions has been reached for One-Click Trading. Click here to - re-authorize. - - ); - } else if (shouldShowInsufficientFundsButton) { - content = ( - There are insufficient funds in your Subaccount for One-Click Trading. Click here to top-up. - ); - } else if (shouldShowOfferButton) { - onCloseClick = handleCloseOfferClick; - content = ( - Enable One-Click Trading} - renderContent={renderTooltipContent} - /> - ); - } else { - return null; - } - - return ( - - {content} - - ); - } -); - -function isTouchDevice() { - return "ontouchstart" in window; -} diff --git a/src/components/Synthetics/AcceptablePriceImpactInputRow/AcceptablePriceImpactInputRow.scss b/src/components/Synthetics/AcceptablePriceImpactInputRow/AcceptablePriceImpactInputRow.scss index d3ca46e338..f7f11e804c 100644 --- a/src/components/Synthetics/AcceptablePriceImpactInputRow/AcceptablePriceImpactInputRow.scss +++ b/src/components/Synthetics/AcceptablePriceImpactInputRow/AcceptablePriceImpactInputRow.scss @@ -16,3 +16,7 @@ color: var(--color-white); } } + +.AcceptablePriceImpactInputRow-na { + line-height: 2.3rem; +} diff --git a/src/components/Synthetics/AcceptablePriceImpactInputRow/AcceptablePriceImpactInputRow.tsx b/src/components/Synthetics/AcceptablePriceImpactInputRow/AcceptablePriceImpactInputRow.tsx index ae35f51687..c6d03b12da 100644 --- a/src/components/Synthetics/AcceptablePriceImpactInputRow/AcceptablePriceImpactInputRow.tsx +++ b/src/components/Synthetics/AcceptablePriceImpactInputRow/AcceptablePriceImpactInputRow.tsx @@ -7,8 +7,8 @@ import { formatPercentage } from "lib/numbers"; import ExchangeInfoRow from "components/Exchange/ExchangeInfoRow"; import PercentageInput from "components/PercentageInput/PercentageInput"; -import "./AcceptablePriceImpactInputRow.scss"; import { bigMath } from "lib/bigmath"; +import "./AcceptablePriceImpactInputRow.scss"; type Props = { acceptablePriceImpactBps?: bigint; @@ -17,6 +17,7 @@ type Props = { priceImpactFeeBps?: bigint; setAcceptablePriceImpactBps: (value: bigint) => void; notAvailable?: boolean; + className?: string; }; const EMPTY_SUGGESTIONS: number[] = []; @@ -28,6 +29,7 @@ function AcceptablePriceImpactInputRowImpl({ priceImpactFeeBps, setAcceptablePriceImpactBps, notAvailable = false, + className, }: Props) { const setValue = useCallback( (value: number | undefined) => { @@ -59,8 +61,12 @@ function AcceptablePriceImpactInputRowImpl({ setValue(recommendedValue); }, [recommendedValue, setValue]); - if (recommendedValue === undefined || initialValue === undefined || priceImpactFeeBps === undefined) { - return null; + if (notAvailable || recommendedValue === undefined || initialValue === undefined || priceImpactFeeBps === undefined) { + return ( + + {t`NA`} + + ); } const recommendedHandle = ( @@ -107,25 +113,23 @@ function AcceptablePriceImpactInputRowImpl({

    ); - const content = notAvailable ? ( - t`NA` - ) : ( - + return ( + + + ); - - return {content}; } export const AcceptablePriceImpactInputRow = memo( diff --git a/src/components/Synthetics/ChartTokenSelector/ChartTokenSelector.tsx b/src/components/Synthetics/ChartTokenSelector/ChartTokenSelector.tsx index 3d571789d3..f48048465d 100644 --- a/src/components/Synthetics/ChartTokenSelector/ChartTokenSelector.tsx +++ b/src/components/Synthetics/ChartTokenSelector/ChartTokenSelector.tsx @@ -5,10 +5,10 @@ import { useMedia } from "react-use"; import { useMarketsInfoData } from "context/SyntheticsStateContext/hooks/globalsHooks"; import { - useTradeboxChooseSuitableMarket, - useTradeboxGetMaxLongShortLiquidityPool, -} from "context/SyntheticsStateContext/hooks/tradeboxHooks"; -import { selectTradeboxTradeType } from "context/SyntheticsStateContext/selectors/tradeboxSelectors"; + selectTradeboxChooseSuitableMarket, + selectTradeboxGetMaxLongShortLiquidityPool, + selectTradeboxTradeType, +} from "context/SyntheticsStateContext/selectors/tradeboxSelectors"; import { useSelector } from "context/SyntheticsStateContext/utils"; import { PreferredTradeTypePickStrategy } from "domain/synthetics/markets/chooseSuitableMarket"; import { getMarketIndexName, getMarketPoolName } from "domain/synthetics/markets/utils"; @@ -86,7 +86,7 @@ function MarketsList(props: { options: Token[] | undefined }) { const sortedTokens = useFilterSortTokens({ options, searchKeyword, tab, isSwap, favoriteTokens, direction, orderBy }); - const chooseSuitableMarket = useTradeboxChooseSuitableMarket(); + const chooseSuitableMarket = useSelector(selectTradeboxChooseSuitableMarket); const marketsInfoData = useMarketsInfoData(); const handleMarketSelect = useCallback( @@ -280,7 +280,7 @@ function useFilterSortTokens({ [favoriteTokens, isSwap, options, searchKeyword, tab] ); - const getMaxLongShortLiquidityPool = useTradeboxGetMaxLongShortLiquidityPool(); + const getMaxLongShortLiquidityPool = useSelector(selectTradeboxGetMaxLongShortLiquidityPool); const sortedTokens = useMemo(() => { if (isSwap || orderBy === "unspecified" || direction === "unspecified") { @@ -335,7 +335,7 @@ function MarketListItem({ tdClassName: string; onMarketSelect: (address: string, preferredTradeType?: PreferredTradeTypePickStrategy | undefined) => void; }) { - const getMaxLongShortLiquidityPool = useTradeboxGetMaxLongShortLiquidityPool(); + const getMaxLongShortLiquidityPool = useSelector(selectTradeboxGetMaxLongShortLiquidityPool); const { maxLongLiquidityPool, maxShortLiquidityPool } = getMaxLongShortLiquidityPool(token); diff --git a/src/components/Synthetics/CollateralSelector/CollateralSelector.tsx b/src/components/Synthetics/CollateralSelector/CollateralSelector.tsx index 6235e41a5d..1bc2dbc70f 100644 --- a/src/components/Synthetics/CollateralSelector/CollateralSelector.tsx +++ b/src/components/Synthetics/CollateralSelector/CollateralSelector.tsx @@ -18,7 +18,15 @@ import { useSelectorClose, } from "../SelectorBase/SelectorBase"; +import { + selectTradeboxMarketInfo, + selectTradeboxTradeType, +} from "context/SyntheticsStateContext/selectors/tradeboxSelectors"; +import { useSelector } from "context/SyntheticsStateContext/utils"; +import { getCollateralInHintText } from "../TradeBox/hooks/useCollateralInTooltipContent"; import "./CollateralSelector.scss"; +import { TradeType } from "domain/synthetics/trade"; +import { MarketInfo } from "domain/synthetics/markets"; type Props = { // eslint-disable-next-line react/no-unused-prop-types @@ -28,17 +36,21 @@ type Props = { onSelect: (tokenAddress: string) => void; }; -export function CollateralSelector(props: Props) { +export function CollateralSelector(props: Props & { marketInfo?: MarketInfo; tradeType: TradeType }) { const isMobile = useMedia(`(max-width: ${SELECTOR_BASE_MOBILE_THRESHOLD}px)`); return ( - {isMobile ? : } + {isMobile ? ( + + ) : ( + + )} ); } -function CollateralSelectorDesktop(props: Props) { +function CollateralSelectorDesktop(props: Props & { tradeType: TradeType; marketInfo?: MarketInfo }) { const close = useSelectorClose(); return ( @@ -53,12 +65,14 @@ function CollateralSelectorDesktop(props: Props) { {props.options?.map((option) => ( { props.onSelect(option.address); close(); }} tokenData={option} + marketInfo={props.marketInfo} /> ))} @@ -74,10 +88,14 @@ function CollateralListItemDesktop({ tokenData, onSelect, disabled, + tradeType, + marketInfo, }: { tokenData: TokenData; onSelect: () => void; disabled?: boolean; + tradeType?: TradeType; + marketInfo?: MarketInfo; }) { const handleClick = useCallback( (e: React.MouseEvent) => { @@ -111,7 +129,10 @@ function CollateralListItemDesktop({ } return ( - + - {props.options?.map((option) => ( - { - props.onSelect(option.address); - close(); - }} - tokenData={option} - /> - ))} + {props.options?.map((option) => { + const description = marketInfo ? getCollateralInHintText(tradeType, option, marketInfo) : ""; + + return ( + <> + { + props.onSelect(option.address); + close(); + }} + tokenData={option} + /> +

    {description}

    + + ); + })} {props.disabledOptions?.map((option) => ( ))} diff --git a/src/components/Synthetics/ConfirmationBox/ConfirmationBox.scss b/src/components/Synthetics/ConfirmationBox/ConfirmationBox.scss deleted file mode 100644 index 38fc666d70..0000000000 --- a/src/components/Synthetics/ConfirmationBox/ConfirmationBox.scss +++ /dev/null @@ -1,56 +0,0 @@ -.ConfirmationBox-main { - display: flex; - flex-direction: column; -} - -.trade-info-wrapper { - display: grid; - grid-template-columns: 48.5% 3% 48.5%; - align-items: center; - margin-top: 0; - - .arrow-icon { - margin-top: 0.5rem; - } - - .trade-token-amount { - color: var(--color-white); - font-size: 1.8rem; - } - - .trade-amount-usd { - font-size: 1.6rem; - color: var(--color-gray-300); - } -} - -.Existing-limit-order { - font-size: 1.4rem; -} - -.Confirmation-box { - .Modal-body { - overflow-x: hidden; - } -} - -.ConfirmationBox-approve-tokens { - display: flex; - flex-direction: column; -} - -.ConfirmationBox-approve-token { - height: 2.2rem; - display: flex; - align-items: center; - margin-top: 0.5rem; - - &:first-child { - margin-top: 0; - } -} - -.SLTP-pnl-tooltip .Tooltip-popup { - white-space: nowrap; - min-width: fit-content; -} diff --git a/src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx b/src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx deleted file mode 100644 index 69e648504c..0000000000 --- a/src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx +++ /dev/null @@ -1,1718 +0,0 @@ -import { Plural, Trans, t } from "@lingui/macro"; -import cx from "classnames"; -import { ApproveTokenButton } from "components/ApproveTokenButton/ApproveTokenButton"; -import Button from "components/Button/Button"; -import Checkbox from "components/Checkbox/Checkbox"; -import { ExchangeInfo } from "components/Exchange/ExchangeInfo"; -import ExchangeInfoRow from "components/Exchange/ExchangeInfoRow"; -import Modal from "components/Modal/Modal"; -import StatsTooltipRow from "components/StatsTooltip/StatsTooltipRow"; -import ToggleSwitch from "components/ToggleSwitch/ToggleSwitch"; -import Tooltip from "components/Tooltip/Tooltip"; -import { ValueTransition } from "components/ValueTransition/ValueTransition"; -import { getContract } from "config/contracts"; -import { - BASIS_POINTS_DIVISOR_BIGINT, - COLLATERAL_SPREAD_SHOW_AFTER_INITIAL_ZERO_THRESHOLD, - HIGH_SPREAD_THRESHOLD, -} from "config/factors"; -import { useSyntheticsEvents } from "context/SyntheticsEvents"; -import { useUserReferralCode } from "domain/referrals/hooks"; -import { - estimateExecuteDecreaseOrderGasLimit, - getBorrowingFactorPerPeriod, - getExecutionFee, - getFundingFactorPerPeriod, -} from "domain/synthetics/fees"; -import { - DecreasePositionSwapType, - OrderType, - PositionOrderInfo, - createDecreaseOrderTxn, - createIncreaseOrderTxn, - createSwapOrderTxn, - isTriggerDecreaseOrderType, -} from "domain/synthetics/orders"; -import { cancelOrdersTxn } from "domain/synthetics/orders/cancelOrdersTxn"; -import { createWrapOrUnwrapTxn } from "domain/synthetics/orders/createWrapOrUnwrapTxn"; -import { formatLeverage, formatLiquidationPrice, getTriggerNameByOrderType } from "domain/synthetics/positions"; -import { - convertToTokenAmount, - convertToUsd, - formatTokensRatio, - getNeedTokenApprove, - useTokensAllowanceData, -} from "domain/synthetics/tokens"; -import { TriggerThresholdType, applySlippageToMinOut, applySlippageToPrice } from "domain/synthetics/trade"; -import { getIsEquivalentTokens, getSpread } from "domain/tokens"; -import { useChainId } from "lib/chains"; -import { CHART_PERIODS, USD_DECIMALS } from "lib/legacy"; - -import { useConnectModal } from "@rainbow-me/rainbowkit"; -import { AlertInfo } from "components/AlertInfo/AlertInfo"; -import { SubaccountNavigationButton } from "components/SubaccountNavigationButton/SubaccountNavigationButton"; -import { useSettings } from "context/SettingsContext/SettingsContextProvider"; -import { useSubaccount, useSubaccountCancelOrdersDetailsMessage } from "context/SubaccountContext/SubaccountContext"; -import { useTokensData } from "context/SyntheticsStateContext/hooks/globalsHooks"; -import { - SidecarLimitOrderEntry, - SidecarLimitOrderEntryValid, - SidecarOrderEntryGroup, - SidecarSlTpOrderEntry, - SidecarSlTpOrderEntryValid, - useSidecarOrders, -} from "domain/synthetics/sidecarOrders/useSidecarOrders"; -import { PERCENTAGE_DECEMALS } from "domain/synthetics/sidecarOrders/utils"; -import { useHighExecutionFeeConsent } from "domain/synthetics/trade/useHighExecutionFeeConsent"; -import { usePriceImpactWarningState } from "domain/synthetics/trade/usePriceImpactWarningState"; -import { helperToast } from "lib/helperToast"; -import { - expandDecimals, - formatAmount, - formatDeltaUsd, - formatPercentage, - formatTokenAmount, - formatTokenAmountWithUsd, - formatUsd, -} from "lib/numbers"; -import { getByKey } from "lib/objects"; -import { usePrevious } from "lib/usePrevious"; -import { getPlusOrMinusSymbol, getPositiveOrNegativeClass } from "lib/utils"; -import useWallet from "lib/wallets/useWallet"; -import { useCallback, useEffect, useMemo, useRef, useState } from "react"; -import { FaArrowRight } from "react-icons/fa"; -import { IoClose } from "react-icons/io5"; -import { useKey, useLatest } from "react-use"; -import { AcceptablePriceImpactInputRow } from "../AcceptablePriceImpactInputRow/AcceptablePriceImpactInputRow"; -import { HighPriceImpactWarning } from "../HighPriceImpactWarning/HighPriceImpactWarning"; -import { NetworkFeeRow } from "../NetworkFeeRow/NetworkFeeRow"; -import { TradeFeesRow } from "../TradeFeesRow/TradeFeesRow"; -import { useTradeboxPoolWarnings } from "../TradeboxPoolWarnings/TradeboxPoolWarnings"; -import { SideOrderEntries } from "./SideOrderEntries"; -import { AllowedSlippageRow } from "./rows/AllowedSlippageRow"; - -import { selectGasLimits, selectGasPrice } from "context/SyntheticsStateContext/selectors/globalSelectors"; -import { makeSelectOrdersByPositionKey } from "context/SyntheticsStateContext/selectors/orderSelectors"; -import { selectSelectedMarketPriceDecimals } from "context/SyntheticsStateContext/selectors/statsSelectors"; -import { - selectTradeboxAvailableMarketsOptions, - selectTradeboxCollateralToken, - selectTradeboxDecreasePositionAmounts, - selectTradeboxDefaultTriggerAcceptablePriceImpactBps, - selectTradeboxExecutionFee, - selectTradeboxExecutionPrice, - selectTradeboxFees, - selectTradeboxFixedTriggerOrderType, - selectTradeboxFixedTriggerThresholdType, - selectTradeboxFromTokenAddress, - selectTradeboxIncreasePositionAmounts, - selectTradeboxIsWrapOrUnwrap, - selectTradeboxKeepLeverage, - selectTradeboxLiquidity, - selectTradeboxMarkPrice, - selectTradeboxMarketInfo, - selectTradeboxMaxLiquidityPath, - selectTradeboxNextPositionValues, - selectTradeboxSelectedPosition, - selectTradeboxSelectedPositionKey, - selectTradeboxSelectedTriggerAcceptablePriceImpactBps, - selectTradeboxSetKeepLeverage, - selectTradeboxSetSelectedAcceptablePriceImpactBps, - selectTradeboxSwapAmounts, - selectTradeboxToTokenAddress, - selectTradeboxTradeFlags, - selectTradeboxTradeRatios, - selectTradeboxTriggerPrice, -} from "context/SyntheticsStateContext/selectors/tradeboxSelectors"; -import { useSelector } from "context/SyntheticsStateContext/utils"; -import { estimateOrderOraclePriceCount } from "domain/synthetics/fees/utils/estimateOraclePriceCount"; -import { bigMath } from "lib/bigmath"; -import { ExecutionPriceRow } from "../ExecutionPriceRow"; -import "./ConfirmationBox.scss"; - -export type Props = { - isVisible: boolean; - error: string | undefined; - onClose: () => void; - onSubmitted: () => void; - setPendingTxns: (txns: any) => void; -}; - -export function ConfirmationBox(p: Props) { - const { error, onClose, onSubmitted, setPendingTxns } = p; - const tokensData = useTokensData(); - - const setSelectedTriggerAcceptablePriceImpactBps = useSelector(selectTradeboxSetSelectedAcceptablePriceImpactBps); - const selectedTriggerAcceptablePriceImpactBps = useSelector(selectTradeboxSelectedTriggerAcceptablePriceImpactBps); - const isWrapOrUnwrap = useSelector(selectTradeboxIsWrapOrUnwrap); - const fromTokenAddress = useSelector(selectTradeboxFromTokenAddress); - const toTokenAddress = useSelector(selectTradeboxToTokenAddress); - const defaultTriggerAcceptablePriceImpactBps = useSelector(selectTradeboxDefaultTriggerAcceptablePriceImpactBps); - const marketInfo = useSelector(selectTradeboxMarketInfo); - const collateralToken = useSelector(selectTradeboxCollateralToken); - const keepLeverage = useSelector(selectTradeboxKeepLeverage); - const setKeepLeverage = useSelector(selectTradeboxSetKeepLeverage); - const fees = useSelector(selectTradeboxFees); - const existingPosition = useSelector(selectTradeboxSelectedPosition); - const marketsOptions = useSelector(selectTradeboxAvailableMarketsOptions); - const { markRatio, triggerRatio } = useSelector(selectTradeboxTradeRatios); - const markPrice = useSelector(selectTradeboxMarkPrice); - const swapAmounts = useSelector(selectTradeboxSwapAmounts); - const increaseAmounts = useSelector(selectTradeboxIncreasePositionAmounts); - const decreaseAmounts = useSelector(selectTradeboxDecreasePositionAmounts); - const nextPositionValues = useSelector(selectTradeboxNextPositionValues); - const executionFee = useSelector(selectTradeboxExecutionFee); - const tradeFlags = useSelector(selectTradeboxTradeFlags); - const triggerPrice = useSelector(selectTradeboxTriggerPrice); - const executionPrice = useSelector(selectTradeboxExecutionPrice); - const gasLimits = useSelector(selectGasLimits); - const gasPrice = useSelector(selectGasPrice); - const fixedTriggerThresholdType = useSelector(selectTradeboxFixedTriggerThresholdType); - const fixedTriggerOrderType = useSelector(selectTradeboxFixedTriggerOrderType); - const { longLiquidity, shortLiquidity } = useSelector(selectTradeboxLiquidity); - - const { element: highExecutionFeeAcknowledgement, isHighFeeConsentError } = useHighExecutionFeeConsent( - executionFee?.feeUsd - ); - - const fromToken = getByKey(tokensData, fromTokenAddress); - const toToken = getByKey(tokensData, toTokenAddress); - const marketDecimals = useSelector(selectSelectedMarketPriceDecimals); - - const { isLong, isShort, isPosition, isSwap, isMarket, isLimit, isTrigger, isIncrease } = tradeFlags; - const { maxLiquidity: swapLiquidityUsd } = useSelector(selectTradeboxMaxLiquidityPath); - const { indexToken } = marketInfo || {}; - - const { signer, account } = useWallet(); - const { chainId } = useChainId(); - const { openConnectModal } = useConnectModal(); - const { setPendingPosition, setPendingOrder } = useSyntheticsEvents(); - const { savedAllowedSlippage, shouldDisableValidationForTesting } = useSettings(); - const prevIsVisible = usePrevious(p.isVisible); - - const { referralCodeForTxn } = useUserReferralCode(signer, chainId, account); - - const [isTriggerWarningAccepted, setIsTriggerWarningAccepted] = useState(false); - const [isSubmitting, setIsSubmitting] = useState(false); - const [allowedSlippage, setAllowedSlippage] = useState(savedAllowedSlippage); - const submitButtonRef = useRef(null); - - useEffect(() => { - setAllowedSlippage(savedAllowedSlippage); - }, [savedAllowedSlippage, p.isVisible]); - - const payAmount = useMemo(() => { - if (isSwap && !isWrapOrUnwrap) { - return swapAmounts?.amountIn; - } - if (isIncrease) { - return increaseAmounts?.initialCollateralAmount; - } - }, [increaseAmounts?.initialCollateralAmount, isIncrease, isSwap, isWrapOrUnwrap, swapAmounts?.amountIn]); - - const { tokensAllowanceData } = useTokensAllowanceData(chainId, { - spenderAddress: getContract(chainId, "SyntheticsRouter"), - tokenAddresses: fromToken ? [fromToken.address] : [], - skip: !p.isVisible, - }); - - const needPayTokenApproval = - tokensAllowanceData && - fromToken && - payAmount !== undefined && - getNeedTokenApprove(tokensAllowanceData, fromToken.address, payAmount); - - const positionKey = useSelector(selectTradeboxSelectedPositionKey); - const positionOrders = useSelector(makeSelectOrdersByPositionKey(positionKey)); - - const { stopLoss, takeProfit, limit } = useSidecarOrders(); - - const sidecarEntries = useMemo( - () => [...(stopLoss?.entries || []), ...(takeProfit?.entries || []), ...(limit?.entries || [])], - [stopLoss, takeProfit, limit] - ); - - const { cancelSltpEntries, createSltpEntries, updateSltpEntries } = useMemo(() => { - const [cancelSltpEntries, createSltpEntries, updateSltpEntries] = sidecarEntries.reduce( - ([cancel, create, update], e) => { - if (e.txnType === "cancel") cancel.push(e as SidecarSlTpOrderEntryValid | SidecarLimitOrderEntryValid); - if (e.txnType === "create" && !!e.decreaseAmounts) create.push(e as SidecarSlTpOrderEntryValid); - if (e.txnType === "update" && (!!e.decreaseAmounts || !!e.increaseAmounts)) - update.push(e as SidecarSlTpOrderEntryValid | SidecarLimitOrderEntryValid); - return [cancel, create, update]; - }, - [[], [], []] as [ - (SidecarSlTpOrderEntryValid | SidecarLimitOrderEntryValid)[], - SidecarSlTpOrderEntryValid[], - (SidecarSlTpOrderEntryValid | SidecarLimitOrderEntryValid)[], - ] - ); - - return { cancelSltpEntries, createSltpEntries, updateSltpEntries }; - }, [sidecarEntries]); - - const subaccountRequiredActions = 1 + cancelSltpEntries.length + createSltpEntries.length + updateSltpEntries.length; - - const getOrderExecutionFee = useCallback( - (swapsCount: number, decreasePositionSwapType: DecreasePositionSwapType | undefined) => { - if (!gasLimits || !tokensData || gasPrice === undefined) return; - - const estimatedGas = estimateExecuteDecreaseOrderGasLimit(gasLimits, { - decreaseSwapType: decreasePositionSwapType, - swapsCount: swapsCount ?? 0, - }); - - const oraclePriceCount = estimateOrderOraclePriceCount(swapsCount); - - return getExecutionFee(chainId, gasLimits, tokensData, estimatedGas, gasPrice, oraclePriceCount); - }, - [gasLimits, tokensData, gasPrice, chainId] - ); - - const getExecutionFeeAmountForEntry = useCallback( - (entry: SidecarSlTpOrderEntry | SidecarLimitOrderEntry) => { - if (!entry.txnType || entry.txnType === "cancel") return undefined; - const securedExecutionFee = entry.order?.executionFee ?? 0n; - - let swapsCount = 0; - - const executionFee = getOrderExecutionFee(swapsCount, entry.decreaseAmounts?.decreaseSwapType); - - if (!executionFee || securedExecutionFee >= executionFee.feeTokenAmount) return undefined; - - return executionFee.feeTokenAmount - securedExecutionFee; - }, - [getOrderExecutionFee] - ); - - const existingTriggerOrders = useMemo( - () => positionOrders.filter((order) => isTriggerDecreaseOrderType(order.orderType)), - [positionOrders] - ); - - const decreaseOrdersThatWillBeExecuted = useMemo(() => { - if (!existingPosition || markPrice === undefined) { - return []; - } - - return existingTriggerOrders.filter((order) => { - return order.triggerThresholdType === TriggerThresholdType.Above - ? markPrice > order.triggerPrice - : markPrice < order.triggerPrice; - }); - }, [existingPosition, existingTriggerOrders, markPrice]); - - const swapSpreadInfo = useMemo(() => { - let spread = BigInt(0); - - if (isSwap && fromToken && toToken) { - const fromSpread = getSpread(fromToken.prices); - const toSpread = getSpread(toToken.prices); - - spread = fromSpread + toSpread; - } else if (isIncrease && fromToken && indexToken) { - const fromSpread = getSpread(fromToken.prices); - const toSpread = getSpread(indexToken.prices); - - spread = fromSpread + toSpread; - - if (isLong) { - spread = fromSpread; - } - } - - const isHigh = spread > HIGH_SPREAD_THRESHOLD; - - const showSpread = isMarket; - - return { spread, showSpread, isHigh }; - }, [isSwap, fromToken, toToken, isIncrease, indexToken, isMarket, isLong]); - - const collateralSpreadInfo = useMemo(() => { - if (!indexToken || !collateralToken) { - return undefined; - } - - let totalSpread = getSpread(indexToken.prices); - - if (getIsEquivalentTokens(collateralToken, indexToken)) { - return { - spread: totalSpread, - isHigh: totalSpread > HIGH_SPREAD_THRESHOLD, - }; - } - - totalSpread = totalSpread + getSpread(collateralToken!.prices!); - - return { - spread: totalSpread, - isHigh: totalSpread > HIGH_SPREAD_THRESHOLD, - }; - }, [collateralToken, indexToken]); - - const title = useMemo(() => { - if (isMarket) { - if (isSwap) { - return t`Confirm Swap`; - } - - return isLong ? t`Confirm Long` : t`Confirm Short`; - } - - if (isLimit) { - return t`Confirm Limit Order`; - } - - return t`Confirm ${getTriggerNameByOrderType(fixedTriggerOrderType)} Order`; - }, [fixedTriggerOrderType, isLimit, isLong, isMarket, isSwap]); - - const priceImpactWarningState = usePriceImpactWarningState({ - positionPriceImpact: fees?.positionPriceImpact, - swapPriceImpact: fees?.swapPriceImpact, - place: "confirmationBox", - tradeFlags, - }); - - const setIsHighPositionImpactAcceptedRef = useLatest(priceImpactWarningState.setIsHighPositionImpactAccepted); - const setIsHighSwapImpactAcceptedRef = useLatest(priceImpactWarningState.setIsHighSwapImpactAccepted); - - useEffect(() => { - setIsHighPositionImpactAcceptedRef.current(false); - setIsHighSwapImpactAcceptedRef.current(false); - }, [p.isVisible, setIsHighPositionImpactAcceptedRef, setIsHighSwapImpactAcceptedRef]); - - const submitButtonState = useMemo(() => { - if (priceImpactWarningState.validationError) { - return { - text: t`Price Impact not yet acknowledged`, - disabled: true, - }; - } - - if (isHighFeeConsentError) { - return { - text: t`High Network Fee not yet acknowledged`, - disabled: true, - }; - } - - if (stopLoss.error?.percentage || takeProfit.error?.percentage) { - return { - text: t`TP/SL orders exceed the position`, - disabled: true, - }; - } - - if (isLimit) { - if (isLong) { - if (markPrice !== undefined && triggerPrice !== undefined && triggerPrice > markPrice) { - return { - text: t`Limit price above Mark Price`, - disabled: true, - }; - } - } else { - if (markPrice !== undefined && triggerPrice !== undefined && triggerPrice < markPrice) { - return { - text: t`Limit price below Mark Price`, - disabled: true, - }; - } - } - } - - if (isSubmitting) { - return { - text: t`Creating Order...`, - disabled: true, - }; - } - - if (error) { - return { - text: error, - disabled: true, - }; - } - - if (needPayTokenApproval) { - return { text: t`Pending ${fromToken?.assetSymbol ?? fromToken?.symbol} approval`, disabled: true }; - } - - if (isIncrease && decreaseOrdersThatWillBeExecuted.length > 0 && !isTriggerWarningAccepted) { - return { - text: t`Accept confirmation of trigger orders`, - disabled: true, - }; - } - - let text = ""; - - if (isMarket) { - if (isSwap) { - text = t`Swap`; - } else { - text = isLong ? t`Long` : t`Short`; - } - } else if (isLimit) { - text = t`Confirm Limit Order`; - } else { - text = t`Confirm ${getTriggerNameByOrderType(fixedTriggerOrderType)} Order`; - } - - if (isIncrease && sidecarEntries.length > 0) { - const isError = sidecarEntries.some((e) => { - if (e.txnType === "cancel") return false; - - return e.sizeUsd?.error || e.percentage?.error || e.price?.error; - }); - - return { - text, - disabled: isError, - }; - } - - return { - text, - disabled: false, - }; - }, [ - priceImpactWarningState.validationError, - isHighFeeConsentError, - isSubmitting, - error, - needPayTokenApproval, - isIncrease, - decreaseOrdersThatWillBeExecuted.length, - isTriggerWarningAccepted, - isMarket, - isLimit, - fromToken?.assetSymbol, - fromToken?.symbol, - isSwap, - isLong, - fixedTriggerOrderType, - sidecarEntries, - stopLoss, - takeProfit, - markPrice, - triggerPrice, - ]); - - useKey( - "Enter", - () => { - if (p.isVisible && !submitButtonState.disabled) { - submitButtonRef.current?.scrollIntoView({ behavior: "smooth", block: "end" }); - onSubmit(); - } - }, - {}, - [p.isVisible, submitButtonState.disabled, onSubmit] - ); - - const summaryExecutionFee = useMemo(() => { - if (!executionFee) return undefined; - - const { feeUsd, feeTokenAmount, feeToken, warning } = executionFee; - - const feeTokenData = getByKey(tokensData, feeToken?.address); - - let summaryFeeUsd = feeUsd ?? 0n; - let summaryFeeTokenAmount = feeTokenAmount ?? 0n; - - sidecarEntries.forEach((entry) => { - const entryFee = getExecutionFeeAmountForEntry(entry) ?? 0n; - - summaryFeeTokenAmount = summaryFeeTokenAmount + entryFee; - summaryFeeUsd = - summaryFeeUsd + (convertToUsd(entryFee, feeToken?.decimals, feeTokenData?.prices?.minPrice) ?? 0n); - }); - - return { - feeUsd: summaryFeeUsd, - feeTokenAmount: summaryFeeTokenAmount, - feeToken, - warning, - }; - }, [executionFee, sidecarEntries, getExecutionFeeAmountForEntry, tokensData]); - - const isAdditionOrdersMsg = - summaryExecutionFee && executionFee && summaryExecutionFee.feeTokenAmount > executionFee.feeTokenAmount; - - const subaccount = useSubaccount(summaryExecutionFee?.feeTokenAmount ?? null, subaccountRequiredActions); - const cancelOrdersDetailsMessage = useSubaccountCancelOrdersDetailsMessage(summaryExecutionFee?.feeTokenAmount, 1); - - function onCancelOrderClick(key: string): void { - if (!signer) return; - cancelOrdersTxn(chainId, signer, subaccount, { - orderKeys: [key], - setPendingTxns: p.setPendingTxns, - detailsMsg: cancelOrdersDetailsMessage, - }); - } - - function onSubmitWrapOrUnwrap() { - if (!account || !swapAmounts || !fromToken || !signer) { - return Promise.resolve(); - } - - return createWrapOrUnwrapTxn(chainId, signer, { - amount: swapAmounts.amountIn, - isWrap: Boolean(fromToken.isNative), - setPendingTxns, - }); - } - - function onSubmitSwap() { - if ( - !account || - !tokensData || - !swapAmounts?.swapPathStats || - !fromToken || - !toToken || - !executionFee || - !signer || - typeof allowedSlippage !== "number" - ) { - helperToast.error(t`Error submitting order`); - return Promise.resolve(); - } - - return createSwapOrderTxn(chainId, signer, subaccount, { - account, - fromTokenAddress: fromToken.address, - fromTokenAmount: swapAmounts.amountIn, - swapPath: swapAmounts.swapPathStats?.swapPath, - toTokenAddress: toToken.address, - orderType: isLimit ? OrderType.LimitSwap : OrderType.MarketSwap, - minOutputAmount: swapAmounts.minOutputAmount, - referralCode: referralCodeForTxn, - executionFee: executionFee.feeTokenAmount, - allowedSlippage, - tokensData, - setPendingTxns, - setPendingOrder, - }); - } - - function onSubmitIncreaseOrder() { - if ( - !tokensData || - !account || - !fromToken || - !collateralToken || - increaseAmounts?.acceptablePrice === undefined || - !executionFee || - !marketInfo || - !signer || - typeof allowedSlippage !== "number" - ) { - helperToast.error(t`Error submitting order`); - return Promise.resolve(); - } - - const commonSecondaryOrderParams = { - account, - marketAddress: marketInfo.marketTokenAddress, - swapPath: [], - allowedSlippage, - initialCollateralAddress: collateralToken.address, - receiveTokenAddress: collateralToken.address, - isLong, - indexToken: marketInfo.indexToken, - }; - - return createIncreaseOrderTxn({ - chainId, - signer, - subaccount, - createIncreaseOrderParams: { - account, - marketAddress: marketInfo.marketTokenAddress, - initialCollateralAddress: fromToken?.address, - initialCollateralAmount: increaseAmounts.initialCollateralAmount, - targetCollateralAddress: collateralToken.address, - collateralDeltaAmount: increaseAmounts.collateralDeltaAmount, - swapPath: increaseAmounts.swapPathStats?.swapPath || [], - sizeDeltaUsd: increaseAmounts.sizeDeltaUsd, - sizeDeltaInTokens: increaseAmounts.sizeDeltaInTokens, - triggerPrice: isLimit ? triggerPrice : undefined, - acceptablePrice: increaseAmounts.acceptablePrice, - isLong, - orderType: isLimit ? OrderType.LimitIncrease : OrderType.MarketIncrease, - executionFee: executionFee.feeTokenAmount, - allowedSlippage, - referralCode: referralCodeForTxn, - indexToken: marketInfo.indexToken, - tokensData, - skipSimulation: isLimit || shouldDisableValidationForTesting, - setPendingTxns: p.setPendingTxns, - setPendingOrder, - setPendingPosition, - }, - createDecreaseOrderParams: createSltpEntries.map((entry) => { - return { - ...commonSecondaryOrderParams, - initialCollateralDeltaAmount: entry.decreaseAmounts.collateralDeltaAmount ?? 0n, - sizeDeltaUsd: entry.decreaseAmounts.sizeDeltaUsd, - sizeDeltaInTokens: entry.decreaseAmounts.sizeDeltaInTokens, - acceptablePrice: entry.decreaseAmounts.acceptablePrice, - triggerPrice: entry.decreaseAmounts.triggerPrice, - minOutputUsd: 0n, - decreasePositionSwapType: entry.decreaseAmounts.decreaseSwapType, - orderType: entry.decreaseAmounts.triggerOrderType!, - referralCode: referralCodeForTxn, - executionFee: getExecutionFeeAmountForEntry(entry) ?? 0n, - tokensData, - txnType: entry.txnType!, - skipSimulation: true, - }; - }), - cancelOrderParams: cancelSltpEntries.map((entry) => ({ - ...commonSecondaryOrderParams, - orderKey: entry.order!.key, - orderType: entry.order!.orderType, - minOutputAmount: 0n, - sizeDeltaUsd: entry.order!.sizeDeltaUsd, - txnType: entry.txnType!, - initialCollateralDeltaAmount: entry.order?.initialCollateralDeltaAmount ?? 0n, - })), - updateOrderParams: updateSltpEntries.map((entry) => ({ - ...commonSecondaryOrderParams, - orderKey: entry.order!.key, - orderType: entry.order!.orderType, - sizeDeltaUsd: (entry.increaseAmounts?.sizeDeltaUsd || entry.decreaseAmounts?.sizeDeltaUsd)!, - acceptablePrice: (entry.increaseAmounts?.acceptablePrice || entry.decreaseAmounts?.acceptablePrice)!, - triggerPrice: (entry.increaseAmounts?.triggerPrice || entry.decreaseAmounts?.triggerPrice)!, - executionFee: getExecutionFeeAmountForEntry(entry) ?? 0n, - minOutputAmount: 0n, - txnType: entry.txnType!, - initialCollateralDeltaAmount: entry.order?.initialCollateralDeltaAmount ?? 0n, - })), - }); - } - - function onSubmitDecreaseOrder() { - if ( - !account || - !marketInfo || - !collateralToken || - fixedTriggerOrderType === undefined || - fixedTriggerThresholdType === undefined || - decreaseAmounts?.acceptablePrice === undefined || - decreaseAmounts?.triggerPrice === undefined || - !executionFee || - !tokensData || - !signer || - typeof allowedSlippage !== "number" - ) { - helperToast.error(t`Error submitting order`); - return Promise.resolve(); - } - - return createDecreaseOrderTxn( - chainId, - signer, - subaccount, - { - account, - marketAddress: marketInfo.marketTokenAddress, - swapPath: [], - initialCollateralDeltaAmount: decreaseAmounts.collateralDeltaAmount, - initialCollateralAddress: collateralToken.address, - receiveTokenAddress: collateralToken.address, - triggerPrice: decreaseAmounts.triggerPrice, - acceptablePrice: decreaseAmounts.acceptablePrice, - sizeDeltaUsd: decreaseAmounts.sizeDeltaUsd, - sizeDeltaInTokens: decreaseAmounts.sizeDeltaInTokens, - minOutputUsd: BigInt(0), - isLong, - decreasePositionSwapType: decreaseAmounts.decreaseSwapType, - orderType: fixedTriggerOrderType, - executionFee: executionFee.feeTokenAmount, - allowedSlippage, - referralCode: referralCodeForTxn, - // Skip simulation to avoid EmptyPosition error - // skipSimulation: !existingPosition || shouldDisableValidation, - skipSimulation: true, - indexToken: marketInfo.indexToken, - tokensData, - }, - { - setPendingTxns, - setPendingOrder, - setPendingPosition, - } - ); - } - - function onSubmit() { - setIsSubmitting(true); - - let txnPromise: Promise; - - if (!account) { - openConnectModal?.(); - return; - } else if (isWrapOrUnwrap) { - txnPromise = onSubmitWrapOrUnwrap(); - } else if (isSwap) { - txnPromise = onSubmitSwap(); - } else if (isIncrease) { - txnPromise = onSubmitIncreaseOrder(); - } else { - txnPromise = onSubmitDecreaseOrder(); - } - - if (subaccount) { - onSubmitted(); - setIsSubmitting(false); - - return; - } - - txnPromise - .then(() => { - onSubmitted(); - }) - .finally(() => { - setIsSubmitting(false); - }); - } - - useEffect( - function reset() { - if (p.isVisible !== prevIsVisible) { - setIsTriggerWarningAccepted(false); - stopLoss?.reset(); - takeProfit?.reset(); - limit?.reset(); - } - }, - [p.isVisible, prevIsVisible, takeProfit, stopLoss, limit] - ); - - function renderSubaccountNavigationButton() { - return ( - - ); - } - - function renderMain() { - if (isSwap) { - return ( - <> -
    -
    -
    - Pay{" "} - - {formatTokenAmount(swapAmounts?.amountIn, fromToken?.decimals, fromToken?.symbol, { - useCommas: true, - })} - -
    -
    {formatUsd(swapAmounts?.usdIn)}
    -
    - -
    -
    - Receive{" "} - - {formatTokenAmount(swapAmounts?.amountOut, toToken?.decimals, toToken?.symbol, { useCommas: true })} - -
    -
    {formatUsd(swapAmounts?.usdOut)}
    -
    -
    -
    {renderSubaccountNavigationButton()}
    - - ); - } - - if (isIncrease) { - return ( - <> -
    -
    -
    - Pay{" "} - - {formatTokenAmount(increaseAmounts?.initialCollateralAmount, fromToken?.decimals, fromToken?.symbol, { - useCommas: true, - })} - -
    -
    {formatUsd(increaseAmounts?.initialCollateralUsd)}
    -
    - -
    -
    - {isLong ? t`Long` : t`Short`}{" "} - - {formatTokenAmount(increaseAmounts?.sizeDeltaInTokens, toToken?.decimals, toToken?.symbol, { - useCommas: true, - })} - -
    -
    {formatUsd(increaseAmounts?.sizeDeltaUsd)}
    -
    -
    -
    {renderSubaccountNavigationButton()}
    - - ); - } - - return ( - <> -
    - Decrease {indexToken?.symbol} {isLong ? t`Long` : t`Short`} -
    - {renderSubaccountNavigationButton()} - - ); - } - - function renderOrderItem(order: PositionOrderInfo) { - return ( -
  • -

    - {order.isLong ? t`Long` : t`Short`} {order.indexToken?.symbol} ({order.targetCollateralToken.symbol}):{" "} - {formatUsd(order.sizeDeltaUsd)} at price   - {order.triggerThresholdType} - {formatUsd(order.triggerPrice, { - displayDecimals: toToken?.priceDecimals, - })}{" "} -

    - -
  • - ); - } - - function renderDifferentTokensWarning() { - if (!isPosition || !fromToken || !toToken) { - return null; - } - const isCollateralTokenNonStable = !collateralToken?.isStable; - const collateralTokenSymbol = collateralToken?.[collateralToken?.isWrapped ? "baseSymbol" : "symbol"]; - const indexTokenSymbol = indexToken?.[indexToken?.isWrapped ? "baseSymbol" : "symbol"]; - - if (isCollateralTokenNonStable && collateralTokenSymbol !== indexTokenSymbol) { - return ( - - - You have selected {collateralTokenSymbol} as Collateral, the Liquidation Price will vary based on the price - of {collateralTokenSymbol}. - - - ); - } - - if (isLong && isCollateralTokenNonStable && collateralTokenSymbol === indexTokenSymbol) { - return ( - - - You have selected {collateralTokenSymbol} as collateral; the liquidation price is higher compared to using a - stablecoin as collateral since the worth of the collateral will change with its price. If required and - available, you can change the collateral type using the "Collateral In" option in the trade box. - - - ); - } - - if (isShort && isCollateralTokenNonStable && collateralTokenSymbol === indexTokenSymbol) { - return ( - - - You have selected {collateralTokenSymbol} as collateral to short {indexTokenSymbol}. - - - ); - } - } - - const isOrphanOrder = - marketsOptions?.collateralWithPosition && - collateralToken && - !getIsEquivalentTokens(marketsOptions.collateralWithPosition, collateralToken); - - function renderDifferentCollateralWarning() { - if (!isOrphanOrder) { - return null; - } - - if (isMarket) { - return ( - - - You have an existing position with {marketsOptions?.collateralWithPosition?.symbol} as collateral. This - action will not apply for that position. - - - ); - } - - return ( - - - You have an existing position with {marketsOptions?.collateralWithPosition?.symbol} as collateral. This Order - will not be valid for that Position. - - - ); - } - - function renderExistingTriggerErrors() { - if (!decreaseOrdersThatWillBeExecuted?.length) { - return; - } - - const existingTriggerOrderLength = decreaseOrdersThatWillBeExecuted.length; - return ( - <> - - - -
      {decreaseOrdersThatWillBeExecuted.map(renderOrderItem)}
    - - ); - } - - function renderAvailableLiquidity() { - const riskThresholdBps = 5000n; - let availableLiquidityUsd: bigint | undefined = undefined; - let availableLiquidityAmount: bigint | undefined = undefined; - let isLiquidityRisk = false; - - let tooltipContent = ""; - - if (isSwap && swapAmounts) { - availableLiquidityUsd = swapLiquidityUsd; - - availableLiquidityAmount = convertToTokenAmount( - availableLiquidityUsd, - toToken?.decimals, - toToken?.prices.maxPrice - ); - - isLiquidityRisk = - bigMath.mulDiv(availableLiquidityUsd, riskThresholdBps, BASIS_POINTS_DIVISOR_BIGINT) < swapAmounts.usdOut; - - tooltipContent = isLiquidityRisk - ? t`There may not be sufficient liquidity to execute your order when the Min. Receive are met.` - : t`The order will only execute if the Min. Receive is met and there is sufficient liquidity.`; - } - - if (isIncrease && increaseAmounts) { - availableLiquidityUsd = isLong ? longLiquidity : shortLiquidity; - - isLiquidityRisk = - bigMath.mulDiv(availableLiquidityUsd!, riskThresholdBps, BASIS_POINTS_DIVISOR_BIGINT) < - increaseAmounts.sizeDeltaUsd; - - tooltipContent = isLiquidityRisk - ? t`There may not be sufficient liquidity to execute your order when the price conditions are met.` - : t`The order will only execute if the price conditions are met and there is sufficient liquidity.`; - } - - return ( - - tooltipContent} - /> - - ); - } - - function renderSwapSpreadWarning() { - if (!isMarket) { - return null; - } - - if (swapSpreadInfo.spread !== undefined && swapSpreadInfo.isHigh) { - return ( -
    - - The spread is {`>`} 1%, please ensure the trade details are acceptable before comfirming - -
    - ); - } - } - - const renderCollateralSpreadWarning = useCallback(() => { - if (collateralSpreadInfo && collateralSpreadInfo.isHigh) { - return ( - - - Transacting with a depegged stable coin is subject to spreads reflecting the worse of current market price - or $1.00, with transactions involving multiple stablecoins may have multiple spreads. - - - ); - } - }, [collateralSpreadInfo]); - - function renderSideOrders(type: "stopLoss" | "takeProfit" | "limit") { - const isStopLoss = type === "stopLoss"; - const isLimitGroup = type === "limit"; - - const entriesInfo: SidecarOrderEntryGroup = { - stopLoss: stopLoss, - takeProfit: takeProfit, - limit: limit, - }[type]; - - if (!entriesInfo || entriesInfo.entries.every((e) => e.txnType === "cancel")) return; - - const label = { - stopLoss: t`Stop-Loss`, - takeProfit: t`Take-Profit`, - limit: t`Limit`, - }[type]; - - const labelPnl = isStopLoss ? t`Stop-Loss PnL` : t`Take-Profit PnL`; - - return ( -
    - - -
    - } - /> - {(!isLimitGroup && entriesInfo.totalPnL !== undefined && entriesInfo.totalPnLPercentage !== undefined && ( - - {entriesInfo.totalPnL === 0n ? ( - "-" - ) : ( - - entriesInfo?.entries?.map((entry, index) => { - if (!entry || !entry.decreaseAmounts || entry.txnType === "cancel") return; - - const price = entry.price?.value && formatAmount(entry.price.value, USD_DECIMALS, marketDecimals); - const percentage = - entry.percentage?.value && formatAmount(entry.percentage.value, PERCENTAGE_DECEMALS, 0); - - return ( -
    - {(price && percentage && ( - - At ${price}, {isStopLoss ? "SL" : "TP"} {percentage}%: - - )) || - null} - - - {formatUsd(entry.decreaseAmounts?.realizedPnl)} ( - {formatPercentage(entry.decreaseAmounts?.realizedPnlPercentage, { - signed: true, - })} - ) - -
    - ); - }) - } - /> - )} -
    - )) || - null} -
    - ); - } - - function renderAcceptablePriceImpactInput() { - return ( - - ); - } - - function renderHighPriceImpactWarning() { - if (!priceImpactWarningState.shouldShowWarning) return null; - return ; - } - - const [initialCollateralSpread, setInitialCollateralSpread] = useState(); - - const collateralSpreadPercent = - collateralSpreadInfo && collateralSpreadInfo.spread !== undefined - ? bigMath.mulDiv(collateralSpreadInfo.spread, BASIS_POINTS_DIVISOR_BIGINT, expandDecimals(1, USD_DECIMALS)) - : undefined; - - useEffect(() => { - if (collateralSpreadPercent !== undefined && initialCollateralSpread === undefined) { - setInitialCollateralSpread(collateralSpreadPercent); - } - }, [collateralSpreadPercent, initialCollateralSpread]); - - const tradeboxPoolWarnings = useTradeboxPoolWarnings(false, "text-gray-300"); - - function renderIncreaseOrderSection() { - if (!marketInfo || !fromToken || !collateralToken || !toToken) { - return null; - } - - const borrowingRate = getBorrowingFactorPerPeriod(marketInfo, isLong, CHART_PERIODS["1h"]) * 100n; - const fundigRate = getFundingFactorPerPeriod(marketInfo, isLong, CHART_PERIODS["1h"]) * 100n; - const isCollateralSwap = !getIsEquivalentTokens(fromToken, collateralToken); - - const shouldApplySlippage = isMarket; - const acceptablePrice = - shouldApplySlippage && increaseAmounts?.acceptablePrice - ? applySlippageToPrice(allowedSlippage, increaseAmounts.acceptablePrice, true, isLong) - : increaseAmounts?.acceptablePrice; - - const isNearZeroFromStart = - initialCollateralSpread === 0n && - (collateralSpreadPercent ?? 0) < COLLATERAL_SPREAD_SHOW_AFTER_INITIAL_ZERO_THRESHOLD; - - const showCollateralSpread = isMarket && !isNearZeroFromStart; - - return ( - - {renderMain()} - - - {tradeboxPoolWarnings} - {renderCollateralSpreadWarning()} - {renderExistingTriggerErrors()} - {renderDifferentTokensWarning()} - - - {renderSideOrders("limit")} - - {renderSideOrders("takeProfit")} - - {renderSideOrders("stopLoss")} - - - {renderLeverage(existingPosition?.leverage, nextPositionValues?.nextLeverage)} - - - - {isLimit && renderAvailableLiquidity()} - {showCollateralSpread && ( - - {formatPercentage(collateralSpreadPercent)} - - )} - {isMarket && ( - - )} - {isLimit && increaseAmounts && renderAcceptablePriceImpactInput()} - - - - {isLimit && ( - - )} - - - - {existingPosition && ( - - } - /> - )} - - - } - /> - - - - {existingPosition && (existingPosition.sizeInUsd ?? 0) > 0 && ( - - } - /> - )} -
    -
    - {isCollateralSwap ? ( - - Collateral ({collateralToken?.symbol}) - - } - position="top-start" - renderContent={() => { - return ( -
    - - {fromToken?.symbol} will be swapped to {collateralToken?.symbol} on order execution.{" "} - {" "} - {isLimit && ( - - Collateral value may differ due to different Price Impact at the time of execution. - - )} -
    - ); - }} - /> - ) : ( - - Collateral ({collateralToken?.symbol}) - - )} -
    -
    - - } - position="top-end" - renderContent={() => { - return ( - <> - Your position's collateral after deducting fees: -
    -
    - {existingPosition && ( - - )} - - -
    - - - ); - }} - /> -
    -
    - - - - - - {decreaseOrdersThatWillBeExecuted?.length > 0 && ( -
    - - - I am aware of the trigger orders - - -
    - )} -
    - - ); - } - - function renderSwapSection() { - return ( - - {renderMain()} - - - {renderSwapSpreadWarning()} - {isLimit && renderLimitPriceWarning()} - - - - {isLimit && renderAvailableLiquidity()} - {(swapSpreadInfo.showSpread && swapSpreadInfo.spread !== undefined && ( - - {formatAmount(swapSpreadInfo.spread * 100n, USD_DECIMALS, 2, true)}% - - )) || - null} - - {isMarket && ( - - )} - - - - {isLimit && ( - - - t`Limit Order Price to guarantee Min. Receive amount is updated in real time in the Orders tab after the order has been created.` - } - /> - - )} - {formatTokensRatio(fromToken, toToken, markRatio)} - - {formatUsd(swapAmounts?.priceIn, { - displayDecimals: fromToken?.priceDecimals, - })} - - - {formatUsd(swapAmounts?.priceOut, { - displayDecimals: toToken?.priceDecimals, - })} - - - - - {!isWrapOrUnwrap && ( - <> - - - - )} - - - - - {isMarket && swapAmounts?.minOutputAmount - ? formatTokenAmount( - applySlippageToMinOut(allowedSlippage, swapAmounts.minOutputAmount), - toToken?.decimals, - toToken?.symbol - ) - : formatTokenAmount(swapAmounts?.minOutputAmount, toToken?.decimals, toToken?.symbol)} - - - - ); - } - - function renderTriggerDecreaseSection() { - return ( - - {renderMain()} - {renderDifferentCollateralWarning()} - - {(existingPosition?.leverage && !decreaseAmounts?.isFullClose && ( - - {renderLeverage( - existingPosition?.leverage, - nextPositionValues?.nextLeverage, - nextPositionValues?.nextSizeUsd !== undefined ? nextPositionValues.nextSizeUsd <= 0 : undefined - )} - {isTrigger && ( - - - Keep leverage at {formatLeverage(existingPosition.leverage)} - - - )} - - )) || - null} - - {decreaseAmounts && decreaseAmounts.triggerOrderType !== OrderType.StopLossDecrease && ( - {renderAcceptablePriceImpactInput()} - )} - - - - - - - {existingPosition && ( - 0 ? ( - - ) : ( - "-" - ) - } - /> - )} - - - - - ) : decreaseAmounts?.sizeDeltaUsd ? ( - formatUsd(decreaseAmounts.sizeDeltaUsd) - ) : ( - "-" - ) - } - /> - - {existingPosition && ( - - {formatDeltaUsd(decreaseAmounts?.estimatedPnl)} ( - {formatPercentage(decreaseAmounts?.estimatedPnlPercentage, { signed: true })}) - - } - to={ - <> - {formatDeltaUsd(nextPositionValues?.nextPnl)} ( - {formatPercentage(nextPositionValues?.nextPnlPercentage, { signed: true })}) - - } - /> - } - /> - )} - - {!existingPosition && } - - {existingPosition && ( - - } - /> - )} - - - - - - - {(existingPosition && decreaseAmounts?.receiveUsd !== undefined && ( - - )) || - null} - - - ); - } - - return ( -
    - - - - {isSwap && renderSwapSection()} - {isIncrease && renderIncreaseOrderSection()} - {isTrigger && renderTriggerDecreaseSection()} - - - - {renderHighPriceImpactWarning()} - - {highExecutionFeeAcknowledgement} - - {(needPayTokenApproval && fromToken && ( - - )) || - null} - - - -
    - -
    -
    -
    - ); -} - -function renderLeverage(from: bigint | undefined, to: bigint | undefined, emptyValue = false) { - return ( - } - /> - ); -} - -function renderLimitPriceWarning() { - return ( - - Limit Order Price will vary based on Fees and Price Impact to guarantee the Min. Receive amount. - - ); -} diff --git a/src/components/Synthetics/ExpandableRow.tsx b/src/components/Synthetics/ExpandableRow.tsx new file mode 100644 index 0000000000..51877ea7d5 --- /dev/null +++ b/src/components/Synthetics/ExpandableRow.tsx @@ -0,0 +1,93 @@ +import cx from "classnames"; +import { ExchangeInfo } from "components/Exchange/ExchangeInfo"; +import TooltipWithPortal from "components/Tooltip/TooltipWithPortal"; +import { usePrevious } from "lib/usePrevious"; +import { ReactNode, useCallback, useEffect, useMemo } from "react"; +import { BiChevronDown, BiChevronUp } from "react-icons/bi"; + +interface Props { + title: ReactNode; + open: boolean; + children: ReactNode; + onToggle: (val: boolean) => void; + /** + * if true - disables the collapse when the error is present + */ + disableCollapseOnError?: boolean; + /** + * if true - expands the row when the error is present + */ + autoExpandOnError?: boolean; + /** + * if true - hides the expand-toggle row + */ + hideExpand?: boolean; + hasError?: boolean; + /** + * error message to show in the tooltip when disableCollapseOnError=true + */ + errorMessage?: ReactNode; +} + +export function ExpandableRow({ + open, + children, + title, + onToggle, + hasError, + disableCollapseOnError = false, + autoExpandOnError = true, + hideExpand = false, + errorMessage, +}: Props) { + const previousHasError = usePrevious(hasError); + + useEffect(() => { + if (autoExpandOnError && hasError && !previousHasError) { + onToggle(true); + } + }, [hasError, previousHasError, open, onToggle, autoExpandOnError]); + + const handleOnClick = useCallback(() => { + if (hasError && disableCollapseOnError) { + return; + } + + onToggle(!open); + }, [onToggle, open, hasError, disableCollapseOnError]); + + const label = useMemo(() => { + return hasError && disableCollapseOnError ? : title; + }, [hasError, disableCollapseOnError, title, errorMessage]); + + const disabled = disableCollapseOnError && hasError; + + return ( + <> + {!hideExpand && ( + {label}} + value={ + open ? ( + + ) : ( + + ) + } + /> + )} +
    + {children} +
    + + ); +} diff --git a/src/components/Synthetics/HighPriceImpactWarning/HighPriceImpactWarning.tsx b/src/components/Synthetics/HighPriceImpactWarning/HighPriceImpactWarning.tsx index ff321ca689..31dada9ce2 100644 --- a/src/components/Synthetics/HighPriceImpactWarning/HighPriceImpactWarning.tsx +++ b/src/components/Synthetics/HighPriceImpactWarning/HighPriceImpactWarning.tsx @@ -3,25 +3,25 @@ import Checkbox from "components/Checkbox/Checkbox"; import { PriceImpactWarningState } from "domain/synthetics/trade/usePriceImpactWarningState"; export type Props = { - priceImpactWarinigState: PriceImpactWarningState; + priceImpactWarningState: PriceImpactWarningState; className?: string; }; -export function HighPriceImpactWarning({ priceImpactWarinigState, className }: Props) { - if (!priceImpactWarinigState.shouldShowWarning) { +export function HighPriceImpactWarning({ priceImpactWarningState, className }: Props) { + if (!priceImpactWarningState.shouldShowWarning) { return null; } - const shouldShowSwapImpact = priceImpactWarinigState.shouldShowWarningForSwap; - const shouldShowPriceImpact = priceImpactWarinigState.shouldShowWarningForPosition; + const shouldShowSwapImpact = priceImpactWarningState.shouldShowWarningForSwap; + const shouldShowPriceImpact = priceImpactWarningState.shouldShowWarningForPosition; return (
    {shouldShowPriceImpact && ( Acknowledge high Price Impact @@ -32,8 +32,8 @@ export function HighPriceImpactWarning({ priceImpactWarinigState, className }: P {shouldShowSwapImpact && ( Acknowledge high Swap Price Impact diff --git a/src/components/Synthetics/OrderEditor/OrderEditor.tsx b/src/components/Synthetics/OrderEditor/OrderEditor.tsx index e4fbeba794..1613bfd884 100644 --- a/src/components/Synthetics/OrderEditor/OrderEditor.tsx +++ b/src/components/Synthetics/OrderEditor/OrderEditor.tsx @@ -35,7 +35,6 @@ import Button from "components/Button/Button"; import { ExchangeInfo } from "components/Exchange/ExchangeInfo"; import ExchangeInfoRow from "components/Exchange/ExchangeInfoRow"; import StatsTooltipRow from "components/StatsTooltip/StatsTooltipRow"; -import { SubaccountNavigationButton } from "components/SubaccountNavigationButton/SubaccountNavigationButton"; import TooltipWithPortal from "components/Tooltip/TooltipWithPortal"; import { ValueTransition } from "components/ValueTransition/ValueTransition"; import { BASIS_POINTS_DIVISOR } from "config/factors"; @@ -80,7 +79,6 @@ import { selectOrderEditorSetAcceptablePriceImpactBps, selectOrderEditorSizeDeltaUsd, selectOrderEditorToToken, - selectOrderEditorTradeFlags, selectOrderEditorTriggerPrice, selectOrderEditorTriggerRatio, } from "context/SyntheticsStateContext/selectors/orderEditorSelectors"; @@ -91,6 +89,7 @@ import { bigMath } from "lib/bigmath"; import { numericBinarySearch } from "lib/binarySearch"; import { helperToast } from "lib/helperToast"; import { useKey } from "react-use"; + import "./OrderEditor.scss"; type Props = { @@ -502,8 +501,6 @@ export function OrderEditor(p: Props) { ] ); - const tradeFlags = useSelector(selectOrderEditorTradeFlags); - const buttonContent = ( ); const button = tooltipContent ? ( @@ -1363,7 +1246,7 @@ export function TradeBox(p: Props) { /> - {isPosition && renderPositionControls()} + {isSwap && isLimit && ( + + + + The execution price will constantly vary based on fees and price impact to guarantee that you + receive the minimum receive amount. + + + + )} - {renderLeverageInfo()} + {isPosition && renderPositionControls()} + + + + + + + {isIncrease && renderIncreaseOrderInfo()} {isTrigger && renderTriggerOrderInfo()} - {selectedPosition && !isSwap && renderExistingPositionInfo()} - {feesType && ( - <> - - - - )} + - {(isTrigger && selectedPosition && decreaseAmounts?.receiveUsd !== undefined && ( + + + + + {isTrigger && selectedPosition && decreaseAmounts?.receiveUsd !== undefined && ( + - )) || - null} - + + )} - - {priceImpactWarningState.shouldShowWarning && ( - - )} - + {isSwap && ( + + + + )} + + {tradeboxWarningRows && {tradeboxWarningRows}} + {triggerConsentRows && {triggerConsentRows}}
    {button}
    @@ -1432,14 +1328,6 @@ export function TradeBox(p: Props) {
    {isPosition && }
    - - ); } diff --git a/src/components/Synthetics/TradeBox/TradeBoxRows/AdvancedDisplayRows.tsx b/src/components/Synthetics/TradeBox/TradeBoxRows/AdvancedDisplayRows.tsx new file mode 100644 index 0000000000..47a5f40278 --- /dev/null +++ b/src/components/Synthetics/TradeBox/TradeBoxRows/AdvancedDisplayRows.tsx @@ -0,0 +1,248 @@ +import { Trans, t } from "@lingui/macro"; +import { ExchangeInfo } from "components/Exchange/ExchangeInfo"; +import { AcceptablePriceImpactInputRow } from "components/Synthetics/AcceptablePriceImpactInputRow/AcceptablePriceImpactInputRow"; +import { ExpandableRow } from "components/Synthetics/ExpandableRow"; +import ToggleSwitch from "components/ToggleSwitch/ToggleSwitch"; +import { ValueTransition } from "components/ValueTransition/ValueTransition"; +import { + selectTradeboxAdvancedOptions, + selectTradeboxDecreasePositionAmounts, + selectTradeboxDefaultTriggerAcceptablePriceImpactBps, + selectTradeboxFees, + selectTradeboxIncreasePositionAmounts, + selectTradeboxIsLeverageEnabled, + selectTradeboxKeepLeverage, + selectTradeboxLeverage, + selectTradeboxNextPositionValues, + selectTradeboxSelectedPosition, + selectTradeboxSelectedTriggerAcceptablePriceImpactBps, + selectTradeboxSetAdvancedOptions, + selectTradeboxSetKeepLeverage, + selectTradeboxSetSelectedAcceptablePriceImpactBps, + selectTradeboxTradeFlags, + selectTradeboxTriggerPrice, +} from "context/SyntheticsStateContext/selectors/tradeboxSelectors"; +import { selectTradeboxCollateralSpreadInfo } from "context/SyntheticsStateContext/selectors/tradeboxSelectors/selectTradeboxCollateralSpreadInfo"; +import { selectTradeboxLiquidityInfo } from "context/SyntheticsStateContext/selectors/tradeboxSelectors/selectTradeboxLiquidityInfo"; +import { useSelector } from "context/SyntheticsStateContext/utils"; +import { OrderType } from "domain/synthetics/orders"; +import { formatLeverage } from "domain/synthetics/positions"; +import { formatDeltaUsd, formatPercentage, formatUsd } from "lib/numbers"; +import { ReactNode, useCallback, useMemo } from "react"; + +import { AllowedSlippageRow } from "./AllowedSlippageRow"; +import { AvailableLiquidityRow } from "./AvailableLiquidityRow"; +import { CollateralSpreadRow } from "./CollateralSpreadRow"; +import { EntryPriceRow } from "./EntryPriceRow"; +import { SwapSpreadRow } from "./SwapSpreadRow"; + +export function AdvancedDisplayRows() { + const tradeFlags = useSelector(selectTradeboxTradeFlags); + const increaseAmounts = useSelector(selectTradeboxIncreasePositionAmounts); + const decreaseAmounts = useSelector(selectTradeboxDecreasePositionAmounts); + const limitPrice = useSelector(selectTradeboxTriggerPrice); + + const setSelectedTriggerAcceptablePriceImpactBps = useSelector(selectTradeboxSetSelectedAcceptablePriceImpactBps); + const selectedTriggerAcceptablePriceImpactBps = useSelector(selectTradeboxSelectedTriggerAcceptablePriceImpactBps); + const defaultTriggerAcceptablePriceImpactBps = useSelector(selectTradeboxDefaultTriggerAcceptablePriceImpactBps); + const fees = useSelector(selectTradeboxFees); + + const { isMarket, isLimit, isTrigger, isSwap } = tradeFlags; + + const isInputDisabled = useMemo(() => { + if (isLimit && increaseAmounts) { + return limitPrice === undefined || limitPrice === 0n; + } + + return decreaseAmounts && decreaseAmounts.triggerOrderType === OrderType.StopLossDecrease; + }, [decreaseAmounts, increaseAmounts, isLimit, limitPrice]); + + return ( + <> + + + + {isMarket && } + {(isLimit || isTrigger) && !isSwap && ( + + )} + + ); +} + +function LeverageInfoRows() { + const { isIncrease, isTrigger } = useSelector(selectTradeboxTradeFlags); + const nextPositionValues = useSelector(selectTradeboxNextPositionValues); + const increaseAmounts = useSelector(selectTradeboxIncreasePositionAmounts); + const decreaseAmounts = useSelector(selectTradeboxDecreasePositionAmounts); + const isLeverageEnabled = useSelector(selectTradeboxIsLeverageEnabled); + const selectedPosition = useSelector(selectTradeboxSelectedPosition); + const leverage = useSelector(selectTradeboxLeverage); + const keepLeverage = useSelector(selectTradeboxKeepLeverage); + const setKeepLeverage = useSelector(selectTradeboxSetKeepLeverage); + + if (isIncrease) { + return ( + 0 ? ( + + ) : ( + formatLeverage(isLeverageEnabled ? leverage : increaseAmounts?.estimatedLeverage) || "-" + ) + } + /> + ); + } else if (isTrigger && selectedPosition) { + let leverageValue: ReactNode = "-"; + + if (decreaseAmounts?.isFullClose) { + leverageValue = t`NA`; + } else if (selectedPosition.sizeInUsd === (decreaseAmounts?.sizeDeltaUsd || 0n)) { + leverageValue = "-"; + } else { + leverageValue = ( + + ); + } + + const keepLeverageChecked = decreaseAmounts?.isFullClose ? false : keepLeverage ?? false; + + return ( + <> + + {selectedPosition?.leverage && ( + + + Keep leverage at {formatLeverage(selectedPosition.leverage)} + + + )} + + ); + } +} + +function ExistingPositionInfoRows() { + const selectedPosition = useSelector(selectTradeboxSelectedPosition); + const nextPositionValues = useSelector(selectTradeboxNextPositionValues); + const { isSwap, isIncrease } = useSelector(selectTradeboxTradeFlags); + const decreaseAmounts = useSelector(selectTradeboxDecreasePositionAmounts); + + if (!selectedPosition || isSwap) { + return null; + } + + return ( + <> + {selectedPosition?.sizeInUsd && selectedPosition.sizeInUsd > 0 && ( + + } + /> + )} + {!isIncrease && ( + + {formatDeltaUsd(decreaseAmounts?.estimatedPnl)} ( + {formatPercentage(decreaseAmounts?.estimatedPnlPercentage, { signed: true })}) + + } + to={ + decreaseAmounts?.sizeDeltaUsd && decreaseAmounts.sizeDeltaUsd > 0 ? ( + <> + {formatDeltaUsd(nextPositionValues?.nextPnl)} ( + {formatPercentage(nextPositionValues?.nextPnlPercentage, { signed: true })}) + + ) : undefined + } + /> + } + /> + )} + + } + /> + + ); +} + +export function TradeBoxAdvancedGroups() { + const options = useSelector(selectTradeboxAdvancedOptions); + const setOptions = useSelector(selectTradeboxSetAdvancedOptions); + const { isSwap } = useSelector(selectTradeboxTradeFlags); + + const { isLiquidityRisk } = useSelector(selectTradeboxLiquidityInfo); + const collateralSpreadInfo = useSelector(selectTradeboxCollateralSpreadInfo); + + const hasError = useMemo(() => { + return isLiquidityRisk || collateralSpreadInfo?.isHigh; + }, [isLiquidityRisk, collateralSpreadInfo]); + + const toggleAdvancedDisplay = useCallback( + (value: boolean) => { + setOptions((ops) => ({ + ...ops, + advancedDisplay: value, + })); + }, + [setOptions] + ); + + const isVisible = isSwap ? true : options.advancedDisplay; + + return ( + + +
    + + + + {!isSwap &&
    } + + ); +} diff --git a/src/components/Synthetics/ConfirmationBox/rows/AllowedSlippageRow.tsx b/src/components/Synthetics/TradeBox/TradeBoxRows/AllowedSlippageRow.tsx similarity index 57% rename from src/components/Synthetics/ConfirmationBox/rows/AllowedSlippageRow.tsx rename to src/components/Synthetics/TradeBox/TradeBoxRows/AllowedSlippageRow.tsx index 1cc1d8e06a..89fba5554c 100644 --- a/src/components/Synthetics/ConfirmationBox/rows/AllowedSlippageRow.tsx +++ b/src/components/Synthetics/TradeBox/TradeBoxRows/AllowedSlippageRow.tsx @@ -6,16 +6,28 @@ import { formatPercentage } from "lib/numbers"; import ExchangeInfoRow from "components/Exchange/ExchangeInfoRow"; import PercentageInput from "components/PercentageInput/PercentageInput"; import TooltipWithPortal from "components/Tooltip/TooltipWithPortal"; +import { useSettings } from "context/SettingsContext/SettingsContextProvider"; +import { + selectSetTradeboxAllowedSlippage, + selectTradeboxAllowedSlippage, +} from "context/SyntheticsStateContext/selectors/tradeboxSelectors"; +import { useSelector } from "context/SyntheticsStateContext/utils"; +import { useEffect } from "react"; +import { useTradeboxChanges } from "../hooks/useTradeboxChanges"; + +export function AllowedSlippageRow() { + const { savedAllowedSlippage } = useSettings(); + const allowedSlippage = useSelector(selectTradeboxAllowedSlippage); + const setAllowedSlippage = useSelector(selectSetTradeboxAllowedSlippage); + + const tradeboxChanges = useTradeboxChanges(); + + useEffect(() => { + if (tradeboxChanges.direction || tradeboxChanges.toTokenAddress) { + setAllowedSlippage(savedAllowedSlippage); + } + }, [tradeboxChanges.direction, tradeboxChanges.toTokenAddress, savedAllowedSlippage, setAllowedSlippage]); -export function AllowedSlippageRow({ - defaultSlippage, - allowedSlippage, - setSlippage, -}: { - defaultSlippage: number; - allowedSlippage: number; - setSlippage: (value: number) => void; -}) { return ( + tooltipContent} + /> + + ); +} diff --git a/src/components/Synthetics/TradeBox/CollateralSelectorRow.tsx b/src/components/Synthetics/TradeBox/TradeBoxRows/CollateralSelectorRow.tsx similarity index 87% rename from src/components/Synthetics/TradeBox/CollateralSelectorRow.tsx rename to src/components/Synthetics/TradeBox/TradeBoxRows/CollateralSelectorRow.tsx index ab9f2ebceb..d881f6b375 100644 --- a/src/components/Synthetics/TradeBox/CollateralSelectorRow.tsx +++ b/src/components/Synthetics/TradeBox/TradeBoxRows/CollateralSelectorRow.tsx @@ -1,4 +1,4 @@ -import { Trans, t } from "@lingui/macro"; +import { Trans } from "@lingui/macro"; import React, { useMemo } from "react"; import { @@ -8,15 +8,19 @@ import { selectTradeboxHasExistingOrder, selectTradeboxHasExistingPosition, selectTradeboxMarketAddress, + selectTradeboxMarketInfo, selectTradeboxSelectedCollateralTokenSymbol, selectTradeboxSetCollateralAddress, selectTradeboxTradeFlags, + selectTradeboxTradeType, } from "context/SyntheticsStateContext/selectors/tradeboxSelectors"; import { useSelector } from "context/SyntheticsStateContext/utils"; import { AlertInfo } from "components/AlertInfo/AlertInfo"; import ExchangeInfoRow from "components/Exchange/ExchangeInfoRow"; -import { CollateralSelector } from "../CollateralSelector/CollateralSelector"; +import TooltipWithPortal from "components/Tooltip/TooltipWithPortal"; +import { CollateralSelector } from "../../CollateralSelector/CollateralSelector"; +import { useCollateralInTooltipContent } from "../hooks/useCollateralInTooltipContent"; export type Props = { selectedMarketAddress?: string; @@ -31,11 +35,18 @@ export function CollateralSelectorRow(p: Props) { const { availableTokens, disabledTokens } = useSelector(selectTradeboxAvailableAndDisabledTokensForCollateral); const warnings = useCollateralWarnings(); + const collateralInTooltipContent = useCollateralInTooltipContent(); + const marketInfo = useSelector(selectTradeboxMarketInfo); + const tradeType = useSelector(selectTradeboxTradeType); return ( <>
    {collateralInTooltipContent}
    }> + Collateral In + + } className="SwapBox-info-row" value={ } /> diff --git a/src/components/Synthetics/TradeBox/TradeBoxRows/CollateralSpreadRow.tsx b/src/components/Synthetics/TradeBox/TradeBoxRows/CollateralSpreadRow.tsx new file mode 100644 index 0000000000..a62224e3bd --- /dev/null +++ b/src/components/Synthetics/TradeBox/TradeBoxRows/CollateralSpreadRow.tsx @@ -0,0 +1,41 @@ +import { t } from "@lingui/macro"; + +import { ExchangeInfo } from "components/Exchange/ExchangeInfo"; +import { BASIS_POINTS_DIVISOR_BIGINT, COLLATERAL_SPREAD_SHOW_AFTER_INITIAL_ZERO_THRESHOLD } from "config/factors"; +import { selectTradeboxTradeFlags } from "context/SyntheticsStateContext/selectors/tradeboxSelectors"; +import { selectTradeboxCollateralSpreadInfo } from "context/SyntheticsStateContext/selectors/tradeboxSelectors/selectTradeboxCollateralSpreadInfo"; +import { useSelector } from "context/SyntheticsStateContext/utils"; +import { bigMath } from "lib/bigmath"; +import { USD_DECIMALS } from "lib/legacy"; +import { expandDecimals, formatPercentage } from "lib/numbers"; + +export function CollateralSpreadRow() { + const tradeFlags = useSelector(selectTradeboxTradeFlags); + + const { isMarket, isSwap } = tradeFlags; + + const collateralSpreadInfo = useSelector(selectTradeboxCollateralSpreadInfo); + + const collateralSpreadPercent = + collateralSpreadInfo && collateralSpreadInfo.spread !== undefined + ? bigMath.mulDiv(collateralSpreadInfo.spread, BASIS_POINTS_DIVISOR_BIGINT, expandDecimals(1, USD_DECIMALS)) + : undefined; + + const initialCollateralSpread = collateralSpreadPercent !== undefined ? collateralSpreadPercent : undefined; + + const isNearZeroFromStart = + initialCollateralSpread === 0n && + (collateralSpreadPercent ?? 0) < COLLATERAL_SPREAD_SHOW_AFTER_INITIAL_ZERO_THRESHOLD; + + const showCollateralSpread = !isSwap && isMarket && !isNearZeroFromStart; + + if (!showCollateralSpread) { + return null; + } + + return ( + + {formatPercentage(collateralSpreadPercent)} + + ); +} diff --git a/src/components/Synthetics/TradeBox/TradeBoxRows/EntryPriceRow.tsx b/src/components/Synthetics/TradeBox/TradeBoxRows/EntryPriceRow.tsx new file mode 100644 index 0000000000..f789575c0c --- /dev/null +++ b/src/components/Synthetics/TradeBox/TradeBoxRows/EntryPriceRow.tsx @@ -0,0 +1,48 @@ +import { t } from "@lingui/macro"; + +import ExchangeInfoRow from "components/Exchange/ExchangeInfoRow"; +import { ValueTransition } from "components/ValueTransition/ValueTransition"; +import { selectSelectedMarketPriceDecimals } from "context/SyntheticsStateContext/selectors/statsSelectors"; +import { + selectTradeboxAdvancedOptions, + selectTradeboxMarkPrice, + selectTradeboxNextPositionValues, + selectTradeboxSelectedPosition, +} from "context/SyntheticsStateContext/selectors/tradeboxSelectors"; +import { useSelector } from "context/SyntheticsStateContext/utils"; +import { formatUsd } from "lib/numbers"; + +export function EntryPriceRow() { + const { advancedDisplay } = useSelector(selectTradeboxAdvancedOptions); + const selectedPosition = useSelector(selectTradeboxSelectedPosition); + const nextPositionValues = useSelector(selectTradeboxNextPositionValues); + const markPrice = useSelector(selectTradeboxMarkPrice); + + const marketDecimals = useSelector(selectSelectedMarketPriceDecimals); + + if (!advancedDisplay || !selectedPosition) { + return null; + } + + return ( + + ) : ( + formatUsd(markPrice, { + displayDecimals: marketDecimals, + }) + ) + } + /> + ); +} diff --git a/src/components/Synthetics/TradeBox/TradeBoxRows/LimitAndTPSLRows.tsx b/src/components/Synthetics/TradeBox/TradeBoxRows/LimitAndTPSLRows.tsx new file mode 100644 index 0000000000..9cfdbd48e4 --- /dev/null +++ b/src/components/Synthetics/TradeBox/TradeBoxRows/LimitAndTPSLRows.tsx @@ -0,0 +1,176 @@ +import { t, Trans } from "@lingui/macro"; +import { ExchangeInfo } from "components/Exchange/ExchangeInfo"; +import { ExpandableRow } from "components/Synthetics/ExpandableRow"; +import { + selectTradeboxAdvancedOptions, + selectTradeboxSetAdvancedOptions, + selectTradeboxTradeFlags, +} from "context/SyntheticsStateContext/selectors/tradeboxSelectors"; +import { useSelector } from "context/SyntheticsStateContext/utils"; +import { SidecarOrderEntryGroup } from "domain/synthetics/sidecarOrders/types"; +import { useSidecarEntries } from "domain/synthetics/sidecarOrders/useSidecarEntries"; +import { useSidecarOrders } from "domain/synthetics/sidecarOrders/useSidecarOrders"; +import { PERCENTAGE_DECEMALS } from "domain/synthetics/sidecarOrders/utils"; +import { USD_DECIMALS } from "lib/legacy"; +import { formatAmount, formatPercentage, formatUsd } from "lib/numbers"; +import { useCallback, useMemo } from "react"; +import { SideOrderEntries } from "../components/SideOrderEntries"; +import TooltipWithPortal from "components/Tooltip/TooltipWithPortal"; +import { selectSelectedMarketPriceDecimals } from "context/SyntheticsStateContext/selectors/statsSelectors"; + +export function LimitAndTPSLRows() { + const { stopLoss, takeProfit, limit } = useSidecarOrders(); + const marketDecimals = useSelector(selectSelectedMarketPriceDecimals); + + function renderSideOrders(type: "stopLoss" | "takeProfit" | "limit") { + const isStopLoss = type === "stopLoss"; + const isLimitGroup = type === "limit"; + + const entriesInfo: SidecarOrderEntryGroup = { + stopLoss: stopLoss, + takeProfit: takeProfit, + limit: limit, + }[type]; + + if (!entriesInfo || entriesInfo.entries.every((e) => e.txnType === "cancel")) return; + + const label = { + stopLoss: t`Stop-Loss`, + takeProfit: t`Take-Profit`, + limit: t`Limit`, + }[type]; + + const labelPnl = isStopLoss ? t`Stop-Loss PnL` : t`Take-Profit PnL`; + + return ( +
    + + +
    + } + /> + {(!isLimitGroup && entriesInfo.totalPnL !== undefined && entriesInfo.totalPnLPercentage !== undefined && ( + + {entriesInfo.totalPnL === 0n ? ( + "-" + ) : ( + + entriesInfo?.entries?.map((entry, index) => { + if (!entry || !entry.decreaseAmounts || entry.txnType === "cancel") return; + + const price = entry.price?.value && formatAmount(entry.price.value, USD_DECIMALS, marketDecimals); + const percentage = + entry.percentage?.value && formatAmount(entry.percentage.value, PERCENTAGE_DECEMALS, 0); + + return ( +
    + {(price && percentage && ( + + At ${price}, {isStopLoss ? "SL" : "TP"} {percentage}%: + + )) || + null} + + + {formatUsd(entry.decreaseAmounts?.realizedPnl)} ( + {formatPercentage(entry.decreaseAmounts?.realizedPnlPercentage, { + signed: true, + })} + ) + +
    + ); + }) + } + /> + )} +
    + )) || + null} +
    + ); + } + + const limitGroup = renderSideOrders("limit"); + + return ( + <> + {limitGroup &&
    {limitGroup}
    } + {renderSideOrders("takeProfit")} + {renderSideOrders("stopLoss")} + + ); +} + +export function LimitAndTPSLGroup() { + const options = useSelector(selectTradeboxAdvancedOptions); + const setOptions = useSelector(selectTradeboxSetAdvancedOptions); + const { isTrigger, isSwap } = useSelector(selectTradeboxTradeFlags); + + const showTPSL = !isTrigger && !isSwap; + + const entries = useSidecarEntries(); + const orders = useSidecarOrders(); + + const hasError = useMemo(() => { + const hasAnyEntryError = entries.some((e) => { + if (e.txnType === "cancel") return false; + + return e.sizeUsd?.error || e.percentage?.error || e.price?.error; + }); + return Boolean(orders.stopLoss.error?.percentage || orders.takeProfit.error?.percentage || hasAnyEntryError); + }, [entries, orders]); + + const isTpSlVisible = hasError ? true : options.limitOrTPSL; + + const toggleLimitOrTPSL = useCallback( + (value: boolean) => { + setOptions((ops) => ({ + ...ops, + limitOrTPSL: value, + })); + }, + [setOptions] + ); + + if (!showTPSL) { + return null; + } + + return ( + + Limit / TP / SL + + } + hasError={hasError} + disableCollapseOnError + autoExpandOnError + errorMessage={There are issues in the TP/SL orders.} + onToggle={toggleLimitOrTPSL} + > + + + ); +} diff --git a/src/components/Synthetics/TradeBox/TradeBoxRows/LimitPriceRow.tsx b/src/components/Synthetics/TradeBox/TradeBoxRows/LimitPriceRow.tsx new file mode 100644 index 0000000000..b0f15c9fca --- /dev/null +++ b/src/components/Synthetics/TradeBox/TradeBoxRows/LimitPriceRow.tsx @@ -0,0 +1,53 @@ +import { t } from "@lingui/macro"; + +import ExchangeInfoRow from "components/Exchange/ExchangeInfoRow"; +import Tooltip from "components/Tooltip/Tooltip"; +import { + selectTradeboxFromToken, + selectTradeboxToToken, + selectTradeboxTradeFlags, + selectTradeboxTradeRatios, + selectTradeboxTriggerPrice, +} from "context/SyntheticsStateContext/selectors/tradeboxSelectors"; +import { useSelector } from "context/SyntheticsStateContext/utils"; +import { formatTokensRatio } from "domain/synthetics/tokens"; +import { formatUsd } from "lib/numbers"; +import { useMemo } from "react"; + +export function LimitPriceRow() { + const { isLimit, isSwap, isIncrease } = useSelector(selectTradeboxTradeFlags); + const triggerPrice = useSelector(selectTradeboxTriggerPrice); + const toToken = useSelector(selectTradeboxToToken); + const fromToken = useSelector(selectTradeboxFromToken); + const { triggerRatio } = useSelector(selectTradeboxTradeRatios); + + const value = useMemo(() => { + if (isSwap) { + return ( + + t`The execution price for the limit order updates in real-time on the orders tab after order creation to guarantee that you receive the minimum receive amount.` + } + /> + ); + } + + if (isIncrease) { + return ( + formatUsd(triggerPrice, { + displayDecimals: toToken?.priceDecimals, + }) || "-" + ); + } + + return null; + }, [isSwap, toToken, triggerPrice, fromToken, triggerRatio, isIncrease]); + + if (!isLimit || !value) { + return null; + } + + return ; +} diff --git a/src/components/Synthetics/TradeBox/TradeBoxRows/MinReceiveRow.tsx b/src/components/Synthetics/TradeBox/TradeBoxRows/MinReceiveRow.tsx new file mode 100644 index 0000000000..fd75e596e6 --- /dev/null +++ b/src/components/Synthetics/TradeBox/TradeBoxRows/MinReceiveRow.tsx @@ -0,0 +1,33 @@ +import { Trans } from "@lingui/macro"; +import { ExchangeInfo } from "components/Exchange/ExchangeInfo"; +import { + selectTradeboxSwapAmounts, + selectTradeboxToToken, + selectTradeboxTradeFlags, +} from "context/SyntheticsStateContext/selectors/tradeboxSelectors"; +import { useSelector } from "context/SyntheticsStateContext/utils"; +import { applySlippageToMinOut } from "domain/synthetics/trade"; +import { formatTokenAmount } from "lib/numbers"; + +export function MinReceiveRow({ allowedSlippage }: { allowedSlippage: number }) { + const { isMarket, isSwap } = useSelector(selectTradeboxTradeFlags); + const swapAmounts = useSelector(selectTradeboxSwapAmounts); + + const toToken = useSelector(selectTradeboxToToken); + + if (!isSwap) { + return null; + } + + return ( + Min. Receive}> + {isMarket && swapAmounts?.minOutputAmount + ? formatTokenAmount( + applySlippageToMinOut(allowedSlippage, swapAmounts.minOutputAmount), + toToken?.decimals, + toToken?.symbol + ) + : formatTokenAmount(swapAmounts?.minOutputAmount, toToken?.decimals, toToken?.symbol)} + + ); +} diff --git a/src/components/Synthetics/TradeBox/TradeBoxRows/OneClickTrading.tsx b/src/components/Synthetics/TradeBox/TradeBoxRows/OneClickTrading.tsx new file mode 100644 index 0000000000..248d1fe0cc --- /dev/null +++ b/src/components/Synthetics/TradeBox/TradeBoxRows/OneClickTrading.tsx @@ -0,0 +1,192 @@ +import { Trans } from "@lingui/macro"; +import { ReactNode, useCallback } from "react"; + +import { AlertInfo } from "components/AlertInfo/AlertInfo"; +import Button from "components/Button/Button"; +import { ExchangeInfo } from "components/Exchange/ExchangeInfo"; +import ExternalLink from "components/ExternalLink/ExternalLink"; +import TooltipWithPortal from "components/Tooltip/TooltipWithPortal"; +import { IS_TOUCH } from "config/env"; +import { + ONE_CLICK_TRADING_NATIVE_TOKEN_WARN_HIDDEN, + ONE_CLICK_TRADING_OFFER_HIDDEN, + ONE_CLICK_TRADING_WRAP_OR_UNWRAP_WARN_HIDDEN, +} from "config/localStorage"; +import { getNativeToken, getWrappedToken } from "config/tokens"; +import { + useIsSubaccountActive, + useSubaccountActionCounts, + useSubaccountInsufficientFunds, + useSubaccountModalOpen, +} from "context/SubaccountContext/SubaccountContext"; +import { useTokensData } from "context/SyntheticsStateContext/hooks/globalsHooks"; +import { + selectTradeboxExecutionFee, + selectTradeboxFromTokenAddress, + selectTradeboxIsWrapOrUnwrap, + selectTradeboxTradeFlags, +} from "context/SyntheticsStateContext/selectors/tradeboxSelectors"; +import { useSelector } from "context/SyntheticsStateContext/utils"; +import { SUBACCOUNT_DOCS_URL } from "domain/synthetics/subaccount/constants"; +import CloseIcon from "img/navbutton-close.svg"; +import { useChainId } from "lib/chains"; +import { useLocalStorageSerializeKey } from "lib/localStorage"; +import { getByKey } from "lib/objects"; +import { useRequiredActions } from "../hooks/useRequiredActions"; + +export function TradeBoxOneClickTrading() { + const executionFee = useSelector(selectTradeboxExecutionFee); + const fromTokenAddress = useSelector(selectTradeboxFromTokenAddress); + const tokensData = useTokensData(); + const fromToken = getByKey(tokensData, fromTokenAddress); + const isWrapOrUnwrap = useSelector(selectTradeboxIsWrapOrUnwrap); + const tradeFlags = useSelector(selectTradeboxTradeFlags); + const { requiredActions } = useRequiredActions(); + + const isSubaccountActive = useIsSubaccountActive(); + const [, setModalOpen] = useSubaccountModalOpen(); + const { chainId } = useChainId(); + + const insufficientFunds = useSubaccountInsufficientFunds(executionFee?.feeTokenAmount); + + const jumpToSubaccount = useCallback(() => { + setModalOpen(true); + }, [setModalOpen]); + + const [offerButtonHidden, setOfferButtonHidden] = useLocalStorageSerializeKey(ONE_CLICK_TRADING_OFFER_HIDDEN, false); + const [nativeTokenWarningHidden, setNativeTokenWarningHidden] = useLocalStorageSerializeKey( + ONE_CLICK_TRADING_NATIVE_TOKEN_WARN_HIDDEN, + false + ); + + const [wrapOrUnwrapWarningHidden, setWrapOrUnwrapWarningHidden] = useLocalStorageSerializeKey( + ONE_CLICK_TRADING_WRAP_OR_UNWRAP_WARN_HIDDEN, + false + ); + + const handleCloseOfferClick = useCallback(() => { + setOfferButtonHidden(true); + }, [setOfferButtonHidden]); + + const handleCloseNativeTokenWarningClick = useCallback(() => { + setNativeTokenWarningHidden(true); + }, [setNativeTokenWarningHidden]); + + const handleCloseWrapOrUnwrapWarningClick = useCallback(() => { + setWrapOrUnwrapWarningHidden(true); + }, [setWrapOrUnwrapWarningHidden]); + + const { remaining } = useSubaccountActionCounts(); + + const isNativeToken = fromToken?.isNative; + + const shouldShowInsufficientFundsButton = isSubaccountActive && insufficientFunds && !isNativeToken; + const shouldShowOfferButton = !isSubaccountActive && !offerButtonHidden && !isNativeToken; + const shouldShowAllowedActionsWarning = + isSubaccountActive && (remaining === 0n || remaining < requiredActions) && !isNativeToken; + const shouldShowWrapOrUnwrapWarning = + !tradeFlags?.isTrigger && isSubaccountActive && !wrapOrUnwrapWarningHidden && isWrapOrUnwrap; + const shouldShowNativeTokenWarning = + !tradeFlags?.isTrigger && isSubaccountActive && !nativeTokenWarningHidden && isNativeToken; + + let content: ReactNode = null; + let onCloseClick: null | (() => void) = null; + let buttonText: ReactNode | null = null; + + const renderTooltipContent = useCallback(() => { + return ( +
    e.stopPropagation()}> + + Reduce wallet signing popups with One-Click Trading. This option is also available through the Wallet menu in + the top right. Read more. + +
    + ); + }, []); + + let clickable = true; + + if (shouldShowWrapOrUnwrapWarning) { + const nativeToken = getNativeToken(chainId); + clickable = false; + onCloseClick = handleCloseWrapOrUnwrapWarningClick; + content = ( + + One-Click Trading is not available for wrapping or unwrapping native token {nativeToken.symbol}. + + ); + } else if (shouldShowNativeTokenWarning) { + const wrappedToken = getWrappedToken(chainId); + const nativeToken = getNativeToken(chainId); + clickable = false; + onCloseClick = handleCloseNativeTokenWarningClick; + content = ( + + + One-Click Trading is not available using network's native token {nativeToken.symbol}. Consider using{" "} + {wrappedToken.symbol} instead. + + + ); + } else if (shouldShowAllowedActionsWarning) { + content = ( + + The previously authorized maximum number of actions has been reached for One-Click Trading. + + ); + buttonText = Re-authorize; + } else if (shouldShowInsufficientFundsButton) { + content = ( + + There are insufficient funds in your subaccount for One-Click Trading + + ); + buttonText = Top-Up; + } else if (shouldShowOfferButton) { + onCloseClick = handleCloseOfferClick; + content = ( + + + One-Click Trading + + + ); + buttonText = Enable; + } else { + return null; + } + + if (buttonText) { + return ( + + + {onCloseClick && ( + close + )} + + } + /> + ); + } + + return content ? : null; +} + +function OneClickAlertInfo({ children }: { children: ReactNode }) { + return ( + + {children} + + ); +} diff --git a/src/components/Synthetics/TradeBox/TradeBoxRows/SwapSpreadRow.tsx b/src/components/Synthetics/TradeBox/TradeBoxRows/SwapSpreadRow.tsx new file mode 100644 index 0000000000..a5a3b9a210 --- /dev/null +++ b/src/components/Synthetics/TradeBox/TradeBoxRows/SwapSpreadRow.tsx @@ -0,0 +1,65 @@ +import { t } from "@lingui/macro"; + +import { ExchangeInfo } from "components/Exchange/ExchangeInfo"; +import { HIGH_SPREAD_THRESHOLD } from "config/factors"; +import { + selectTradeboxFromToken, + selectTradeboxMarketInfo, + selectTradeboxToToken, + selectTradeboxTradeFlags, +} from "context/SyntheticsStateContext/selectors/tradeboxSelectors"; +import { useSelector } from "context/SyntheticsStateContext/utils"; +import { getSpread } from "domain/tokens"; +import { USD_DECIMALS } from "lib/legacy"; +import { formatAmount } from "lib/numbers"; +import { useMemo } from "react"; + +export function SwapSpreadRow() { + const tradeFlags = useSelector(selectTradeboxTradeFlags); + const fromToken = useSelector(selectTradeboxFromToken); + const toToken = useSelector(selectTradeboxToToken); + const marketInfo = useSelector(selectTradeboxMarketInfo); + + const indexToken = marketInfo?.indexToken; + + const { isMarket, isSwap, isLong, isIncrease } = tradeFlags; + + const swapSpreadInfo = useMemo(() => { + let spread = BigInt(0); + + if (isSwap && fromToken && toToken) { + const fromSpread = getSpread(fromToken.prices); + const toSpread = getSpread(toToken.prices); + + spread = fromSpread + toSpread; + } else if (isIncrease && fromToken && indexToken) { + const fromSpread = getSpread(fromToken.prices); + const toSpread = getSpread(indexToken.prices); + + spread = fromSpread + toSpread; + + if (isLong) { + spread = fromSpread; + } + } + + const isHigh = spread > HIGH_SPREAD_THRESHOLD; + + const showSpread = isMarket; + + return { spread, showSpread, isHigh }; + }, [isSwap, fromToken, toToken, isIncrease, indexToken, isMarket, isLong]); + + if (!isSwap) { + return null; + } + + return ( + swapSpreadInfo.showSpread && + swapSpreadInfo.spread !== undefined && ( + + {formatAmount(swapSpreadInfo.spread * 100n, USD_DECIMALS, 2, true)}% + + ) + ); +} diff --git a/src/components/Synthetics/ConfirmationBox/SideOrderEntries.tsx b/src/components/Synthetics/TradeBox/components/SideOrderEntries.tsx similarity index 98% rename from src/components/Synthetics/ConfirmationBox/SideOrderEntries.tsx rename to src/components/Synthetics/TradeBox/components/SideOrderEntries.tsx index eee365a3a5..81dbf3e2cd 100644 --- a/src/components/Synthetics/ConfirmationBox/SideOrderEntries.tsx +++ b/src/components/Synthetics/TradeBox/components/SideOrderEntries.tsx @@ -1,17 +1,17 @@ -import { useRef, useMemo, useCallback } from "react"; -import cx from "classnames"; -import { FaPlus } from "react-icons/fa"; import { t } from "@lingui/macro"; +import cx from "classnames"; import NumberInput from "components/NumberInput/NumberInput"; import { NUMBER_WITH_TWO_DECIMALS } from "components/PercentageInput/PercentageInput"; -import TooltipWithPortal from "components/Tooltip/TooltipWithPortal"; import SuggestionInput from "components/SuggestionInput/SuggestionInput"; -import { useSelector } from "context/SyntheticsStateContext/utils"; +import TooltipWithPortal from "components/Tooltip/TooltipWithPortal"; import { selectTradeboxMarketInfo } from "context/SyntheticsStateContext/selectors/tradeboxSelectors"; -import { SidecarOrderEntryGroup, SidecarOrderEntry } from "domain/synthetics/sidecarOrders/useSidecarOrders"; +import { useSelector } from "context/SyntheticsStateContext/utils"; import { isIncreaseOrderType } from "domain/synthetics/orders"; +import { SidecarOrderEntry, SidecarOrderEntryGroup } from "domain/synthetics/sidecarOrders/useSidecarOrders"; import { TokenData } from "domain/synthetics/tokens"; import { formatUsd } from "lib/numbers"; +import { useCallback, useMemo, useRef } from "react"; +import { FaPlus } from "react-icons/fa"; import { selectSelectedMarketPriceDecimals } from "context/SyntheticsStateContext/selectors/statsSelectors"; const SUGGESTION_PERCENTAGE_LIST = [10, 25, 50, 75, 100]; diff --git a/src/components/Synthetics/TradeBox/hooks/useCollateralInTooltipContent.tsx b/src/components/Synthetics/TradeBox/hooks/useCollateralInTooltipContent.tsx new file mode 100644 index 0000000000..3693308c64 --- /dev/null +++ b/src/components/Synthetics/TradeBox/hooks/useCollateralInTooltipContent.tsx @@ -0,0 +1,70 @@ +import { Trans } from "@lingui/macro"; +import { useMemo } from "react"; + +import { + selectTradeboxCollateralToken, + selectTradeboxMarketInfo, + selectTradeboxTradeType, +} from "context/SyntheticsStateContext/selectors/tradeboxSelectors"; +import { useSelector } from "context/SyntheticsStateContext/utils"; +import { MarketInfo } from "domain/synthetics/markets"; +import { TokenData } from "domain/synthetics/tokens"; +import { TradeType } from "../../../../domain/synthetics/trade/types"; + +export function useCollateralInTooltipContent() { + const collateralToken = useSelector(selectTradeboxCollateralToken); + const marketInfo = useSelector(selectTradeboxMarketInfo); + const tradeType = useSelector(selectTradeboxTradeType); + + return useMemo(() => { + if (!collateralToken || !marketInfo) { + return null; + } + + return getCollateralInHintText(tradeType, collateralToken, marketInfo); + }, [collateralToken, marketInfo, tradeType]); +} + +export function getCollateralInHintText(tradeType: TradeType, collateralToken: TokenData, marketInfo: MarketInfo) { + const indexSymbol = marketInfo.indexToken.symbol; + const collateralSymbol = collateralToken.symbol; + + if (tradeType === TradeType.Long) { + if (collateralToken.isStable) { + return You will be long {indexSymbol} only from your long position.; + } else if (marketInfo.indexToken.isSynthetic) { + return ( + + You will be long {indexSymbol} from your long position, while being long {collateralSymbol} from your{" "} + {collateralSymbol} collateral. The liquidation price will vary based on the price of {collateralSymbol}. + + ); + } else { + return ( + + You will be long {indexSymbol} from your long position, as well as from your {collateralSymbol} collateral. + The liquidation price is higher compared to using a stablecoin as collateral since the worth of the collateral + will change with its price. + + ); + } + } else { + if (collateralToken.isStable) { + return You will be short {indexSymbol} only from your short position.; + } else if (marketInfo.indexToken.isSynthetic) { + return ( + + You will be short {indexSymbol} from your short position, while being long {collateralSymbol} from your{" "} + {collateralSymbol} collateral. The liquidation price will vary based on the price of {collateralSymbol}. + + ); + } else { + return ( + + You will be short {indexSymbol} from your short position, while being long {collateralSymbol} from your{" "} + {collateralSymbol} collateral. This can be useful for delta-neutral strategies to earn funding fees. + + ); + } + } +} diff --git a/src/components/Synthetics/TradeBox/hooks/useDecreaseOrdersThatWillBeExecuted.ts b/src/components/Synthetics/TradeBox/hooks/useDecreaseOrdersThatWillBeExecuted.ts new file mode 100644 index 0000000000..9fc0d93690 --- /dev/null +++ b/src/components/Synthetics/TradeBox/hooks/useDecreaseOrdersThatWillBeExecuted.ts @@ -0,0 +1,35 @@ +import { makeSelectOrdersByPositionKey } from "context/SyntheticsStateContext/selectors/orderSelectors"; +import { + selectTradeboxMarkPrice, + selectTradeboxSelectedPosition, + selectTradeboxSelectedPositionKey, +} from "context/SyntheticsStateContext/selectors/tradeboxSelectors"; +import { useSelector } from "context/SyntheticsStateContext/utils"; +import { isTriggerDecreaseOrderType } from "domain/synthetics/orders"; +import { TriggerThresholdType } from "domain/synthetics/trade"; + +import { useMemo } from "react"; + +export function useDecreaseOrdersThatWillBeExecuted() { + const markPrice = useSelector(selectTradeboxMarkPrice); + const existingPosition = useSelector(selectTradeboxSelectedPosition); + const positionKey = useSelector(selectTradeboxSelectedPositionKey); + const positionOrders = useSelector(makeSelectOrdersByPositionKey(positionKey)); + + const existingTriggerOrders = useMemo( + () => positionOrders.filter((order) => isTriggerDecreaseOrderType(order.orderType)), + [positionOrders] + ); + + return useMemo(() => { + if (!existingPosition || markPrice === undefined) { + return []; + } + + return existingTriggerOrders.filter((order) => { + return order.triggerThresholdType === TriggerThresholdType.Above + ? markPrice > order.triggerPrice + : markPrice < order.triggerPrice; + }); + }, [existingPosition, existingTriggerOrders, markPrice]); +} diff --git a/src/components/Synthetics/TradeBox/hooks/useRequiredActions.tsx b/src/components/Synthetics/TradeBox/hooks/useRequiredActions.tsx new file mode 100644 index 0000000000..c1d0a0e82d --- /dev/null +++ b/src/components/Synthetics/TradeBox/hooks/useRequiredActions.tsx @@ -0,0 +1,36 @@ +import { useMemo } from "react"; + +import { SidecarLimitOrderEntryValid, SidecarSlTpOrderEntryValid } from "domain/synthetics/sidecarOrders/types"; +import { useSidecarEntries } from "domain/synthetics/sidecarOrders/useSidecarEntries"; + +export function useRequiredActions() { + const sidecarEntries = useSidecarEntries(); + + const { cancelSltpEntries, createSltpEntries, updateSltpEntries } = useMemo(() => { + const [cancelSltpEntries, createSltpEntries, updateSltpEntries] = sidecarEntries.reduce( + ([cancel, create, update], e) => { + if (e.txnType === "cancel") cancel.push(e as SidecarSlTpOrderEntryValid | SidecarLimitOrderEntryValid); + if (e.txnType === "create" && !!e.decreaseAmounts) create.push(e as SidecarSlTpOrderEntryValid); + if (e.txnType === "update" && (!!e.decreaseAmounts || !!e.increaseAmounts)) + update.push(e as SidecarSlTpOrderEntryValid | SidecarLimitOrderEntryValid); + return [cancel, create, update]; + }, + [[], [], []] as [ + (SidecarSlTpOrderEntryValid | SidecarLimitOrderEntryValid)[], + SidecarSlTpOrderEntryValid[], + (SidecarSlTpOrderEntryValid | SidecarLimitOrderEntryValid)[], + ] + ); + + return { cancelSltpEntries, createSltpEntries, updateSltpEntries }; + }, [sidecarEntries]); + + const requiredActions = 1 + cancelSltpEntries.length + createSltpEntries.length + updateSltpEntries.length; + + return { + requiredActions, + cancelSltpEntries, + createSltpEntries, + updateSltpEntries, + }; +} diff --git a/src/components/Synthetics/TradeBox/hooks/useTPSLSummaryExecutionFee.ts b/src/components/Synthetics/TradeBox/hooks/useTPSLSummaryExecutionFee.ts new file mode 100644 index 0000000000..dfa746da8f --- /dev/null +++ b/src/components/Synthetics/TradeBox/hooks/useTPSLSummaryExecutionFee.ts @@ -0,0 +1,92 @@ +import { useTokensData } from "context/SyntheticsStateContext/hooks/globalsHooks"; +import { selectTradeboxExecutionFee } from "context/SyntheticsStateContext/selectors/tradeboxSelectors"; +import { useSelector } from "context/SyntheticsStateContext/utils"; +import { + estimateExecuteDecreaseOrderGasLimit, + getExecutionFee, + useGasLimits, + useGasPrice, +} from "domain/synthetics/fees"; +import { estimateOrderOraclePriceCount } from "domain/synthetics/fees/utils/estimateOraclePriceCount"; +import { DecreasePositionSwapType } from "domain/synthetics/orders"; +import { SidecarLimitOrderEntry, SidecarSlTpOrderEntry } from "domain/synthetics/sidecarOrders/types"; +import { useSidecarEntries } from "domain/synthetics/sidecarOrders/useSidecarEntries"; +import { convertToUsd } from "domain/synthetics/tokens"; +import { useChainId } from "lib/chains"; +import { getByKey } from "lib/objects"; +import { useCallback, useMemo } from "react"; + +export const useTPSLSummaryExecutionFee = () => { + const executionFee = useSelector(selectTradeboxExecutionFee); + const sidecarEntries = useSidecarEntries(); + const tokensData = useTokensData(); + + const { chainId } = useChainId(); + + const gasLimits = useGasLimits(chainId); + const gasPrice = useGasPrice(chainId); + + const getOrderExecutionFee = useCallback( + (swapsCount: number, decreasePositionSwapType: DecreasePositionSwapType | undefined) => { + if (!gasLimits || !tokensData || gasPrice === undefined) return; + + const estimatedGas = estimateExecuteDecreaseOrderGasLimit(gasLimits, { + decreaseSwapType: decreasePositionSwapType, + swapsCount: swapsCount ?? 0, + }); + + const oraclePriceCount = estimateOrderOraclePriceCount(swapsCount); + + return getExecutionFee(chainId, gasLimits, tokensData, estimatedGas, gasPrice, oraclePriceCount); + }, + [gasLimits, tokensData, gasPrice, chainId] + ); + + const getExecutionFeeAmountForEntry = useCallback( + (entry: SidecarSlTpOrderEntry | SidecarLimitOrderEntry) => { + if (!entry.txnType || entry.txnType === "cancel") return undefined; + const securedExecutionFee = entry.order?.executionFee ?? 0n; + + let swapsCount = 0; + + const executionFee = getOrderExecutionFee(swapsCount, entry.decreaseAmounts?.decreaseSwapType); + + if (!executionFee || securedExecutionFee >= executionFee.feeTokenAmount) return undefined; + + return executionFee.feeTokenAmount - securedExecutionFee; + }, + [getOrderExecutionFee] + ); + + const summaryExecutionFee = useMemo(() => { + if (!executionFee) return undefined; + + const { feeUsd, feeTokenAmount, feeToken, warning } = executionFee; + + const feeTokenData = getByKey(tokensData, feeToken?.address); + + let summaryFeeUsd = feeUsd ?? 0n; + let summaryFeeTokenAmount = feeTokenAmount ?? 0n; + + sidecarEntries.forEach((entry) => { + const entryFee = getExecutionFeeAmountForEntry(entry) ?? 0n; + + summaryFeeTokenAmount = summaryFeeTokenAmount + entryFee; + summaryFeeUsd = + summaryFeeUsd + (convertToUsd(entryFee, feeToken?.decimals, feeTokenData?.prices?.minPrice) ?? 0n); + }); + + return { + feeUsd: summaryFeeUsd, + feeTokenAmount: summaryFeeTokenAmount, + feeToken, + warning, + }; + }, [executionFee, sidecarEntries, getExecutionFeeAmountForEntry, tokensData]); + + return { + summaryExecutionFee, + getOrderExecutionFee, + getExecutionFeeAmountForEntry, + }; +}; diff --git a/src/components/Synthetics/TradeBox/hooks/useTradeButtonState.tsx b/src/components/Synthetics/TradeBox/hooks/useTradeButtonState.tsx new file mode 100644 index 0000000000..965ba156a7 --- /dev/null +++ b/src/components/Synthetics/TradeBox/hooks/useTradeButtonState.tsx @@ -0,0 +1,115 @@ +import { t } from "@lingui/macro"; +import { useSidecarOrders } from "domain/synthetics/sidecarOrders/useSidecarOrders"; +import type { TradeStage } from "domain/synthetics/trade/useTradeboxState"; + +import { + selectTradeboxMarkPrice, + selectTradeboxTradeFlags, + selectTradeboxTriggerPrice, +} from "context/SyntheticsStateContext/selectors/tradeboxSelectors"; +import { useSelector } from "context/SyntheticsStateContext/utils"; +import { useSidecarEntries } from "domain/synthetics/sidecarOrders/useSidecarEntries"; +import { useMemo } from "react"; +import { useDecreaseOrdersThatWillBeExecuted } from "./useDecreaseOrdersThatWillBeExecuted"; + +export function useTradeboxButtonState({ + stage, + isTriggerWarningAccepted, + text, + error, +}: { + stage: TradeStage; + isTriggerWarningAccepted: boolean; + text: string; + error: string | undefined; +}) { + const tradeFlags = useSelector(selectTradeboxTradeFlags); + const markPrice = useSelector(selectTradeboxMarkPrice); + const triggerPrice = useSelector(selectTradeboxTriggerPrice); + const { stopLoss, takeProfit } = useSidecarOrders(); + const sidecarEntries = useSidecarEntries(); + + const { isIncrease, isLimit, isLong } = tradeFlags; + + const decreaseOrdersThatWillBeExecuted = useDecreaseOrdersThatWillBeExecuted(); + + return useMemo(() => { + if (error) { + return { + text: error, + disabled: true, + }; + } + + if (stopLoss.error?.percentage || takeProfit.error?.percentage) { + return { + text: t`TP/SL orders exceed the position`, + disabled: true, + }; + } + + if (isLimit) { + if (isLong) { + if (markPrice !== undefined && triggerPrice !== undefined && triggerPrice > markPrice) { + return { + text: t`Limit price above Mark Price`, + disabled: true, + }; + } + } else { + if (markPrice !== undefined && triggerPrice !== undefined && triggerPrice < markPrice) { + return { + text: t`Limit price below Mark Price`, + disabled: true, + }; + } + } + } + + if (stage === "processing") { + return { + text: t`Creating Order...`, + disabled: true, + }; + } + + if (isIncrease && decreaseOrdersThatWillBeExecuted.length > 0 && !isTriggerWarningAccepted) { + return { + text: t`Accept confirmation of trigger orders`, + disabled: true, + }; + } + + if (isIncrease && sidecarEntries.length > 0) { + const isError = sidecarEntries.some((e) => { + if (e.txnType === "cancel") return false; + + return e.sizeUsd?.error || e.percentage?.error || e.price?.error; + }); + + return { + text, + disabled: isError, + }; + } + + return { + text, + disabled: false, + }; + }, [ + isIncrease, + decreaseOrdersThatWillBeExecuted.length, + isLimit, + isLong, + sidecarEntries, + stopLoss, + takeProfit, + markPrice, + triggerPrice, + stage, + text, + isTriggerWarningAccepted, + error, + ]); +} diff --git a/src/components/Synthetics/TradeBox/hooks/useTradeWarningsRows.tsx b/src/components/Synthetics/TradeBox/hooks/useTradeWarningsRows.tsx new file mode 100644 index 0000000000..4f35804bc9 --- /dev/null +++ b/src/components/Synthetics/TradeBox/hooks/useTradeWarningsRows.tsx @@ -0,0 +1,100 @@ +import { t } from "@lingui/macro"; +import { ApproveTokenButton } from "components/ApproveTokenButton/ApproveTokenButton"; +import { HighPriceImpactWarning } from "components/Synthetics/HighPriceImpactWarning/HighPriceImpactWarning"; +import { getContract } from "config/contracts"; +import { useTokensData } from "context/SyntheticsStateContext/hooks/globalsHooks"; +import { + selectTradeboxExecutionFee, + selectTradeboxFromTokenAddress, + selectTradeboxIncreasePositionAmounts, + selectTradeboxIsWrapOrUnwrap, + selectTradeboxSwapAmounts, + selectTradeboxTradeFlags, +} from "context/SyntheticsStateContext/selectors/tradeboxSelectors"; +import { useSelector } from "context/SyntheticsStateContext/utils"; +import { getNeedTokenApprove, useTokensAllowanceData } from "domain/synthetics/tokens"; +import { useHighExecutionFeeConsent } from "domain/synthetics/trade/useHighExecutionFeeConsent"; +import { usePriceImpactWarningState } from "domain/synthetics/trade/usePriceImpactWarningState"; +import { useChainId } from "lib/chains"; +import { getByKey } from "lib/objects"; +import { useMemo } from "react"; + +export function useTradeboxWarningsRows(priceImpactWarningState: ReturnType) { + const tokenData = useTokensData(); + const { chainId } = useChainId(); + const fromTokenAddress = useSelector(selectTradeboxFromTokenAddress); + const tradeFlags = useSelector(selectTradeboxTradeFlags); + const fromToken = getByKey(tokenData, fromTokenAddress); + const increaseAmounts = useSelector(selectTradeboxIncreasePositionAmounts); + const isWrapOrUnwrap = useSelector(selectTradeboxIsWrapOrUnwrap); + const swapAmounts = useSelector(selectTradeboxSwapAmounts); + const executionFee = useSelector(selectTradeboxExecutionFee); + const { tokensAllowanceData } = useTokensAllowanceData(chainId, { + spenderAddress: getContract(chainId, "SyntheticsRouter"), + tokenAddresses: fromToken ? [fromToken.address] : [], + skip: false, + }); + + const { isSwap, isIncrease } = tradeFlags; + + const payAmount = useMemo(() => { + if (isSwap && !isWrapOrUnwrap) { + return swapAmounts?.amountIn; + } + if (isIncrease) { + return increaseAmounts?.initialCollateralAmount; + } + }, [increaseAmounts?.initialCollateralAmount, isIncrease, isSwap, isWrapOrUnwrap, swapAmounts?.amountIn]); + + const needPayTokenApproval = + tokensAllowanceData && + fromToken && + payAmount !== undefined && + getNeedTokenApprove(tokensAllowanceData, fromToken.address, payAmount); + + const { element: highExecutionFeeAcknowledgement, isHighFeeConsentError } = useHighExecutionFeeConsent( + executionFee?.feeUsd + ); + + const consentError: string | undefined = useMemo(() => { + if (highExecutionFeeAcknowledgement && isHighFeeConsentError) { + return t`High Network Fee not yet acknowledged`; + } + + if ( + (priceImpactWarningState.shouldShowWarningForPosition && !priceImpactWarningState.isHighPositionImpactAccepted) || + (priceImpactWarningState.shouldShowWarningForSwap && !priceImpactWarningState.isHighSwapImpactAccepted) + ) { + return t`Price Impact not yet acknowledged`; + } + + if (needPayTokenApproval && fromToken) { + return t`Pending ${fromToken?.assetSymbol ?? fromToken?.symbol} approval`; + } + + return undefined; + }, [ + fromToken, + needPayTokenApproval, + priceImpactWarningState, + highExecutionFeeAcknowledgement, + isHighFeeConsentError, + ]); + + const element = ( + <> + + {highExecutionFeeAcknowledgement} + {(needPayTokenApproval && fromToken && ( + + )) || + null} + + ); + + return [element, consentError] as const; +} diff --git a/src/components/Synthetics/TradeBox/hooks/useTradeboxAvailablePriceImpactValues.ts b/src/components/Synthetics/TradeBox/hooks/useTradeboxAvailablePriceImpactValues.ts new file mode 100644 index 0000000000..b192d14c3e --- /dev/null +++ b/src/components/Synthetics/TradeBox/hooks/useTradeboxAvailablePriceImpactValues.ts @@ -0,0 +1,103 @@ +import { useEffect } from "react"; + +import { + selectTradeboxDecreasePositionAmounts, + selectTradeboxDefaultTriggerAcceptablePriceImpactBps, + selectTradeboxIncreasePositionAmounts, + selectTradeboxSelectedTriggerAcceptablePriceImpactBps, + selectTradeboxSetDefaultTriggerAcceptablePriceImpactBps, + selectTradeboxSetFixedTriggerOrderType, + selectTradeboxSetFixedTriggerThresholdType, + selectTradeboxSetSelectedAcceptablePriceImpactBps, + selectTradeboxTradeFlags, +} from "context/SyntheticsStateContext/selectors/tradeboxSelectors"; +import { useSelector } from "context/SyntheticsStateContext/utils"; + +import { bigMath } from "lib/bigmath"; +import { useTradeboxChanges } from "./useTradeboxChanges"; + +export function useTradeboxAvailablePriceImpactValues() { + const increaseAmounts = useSelector(selectTradeboxIncreasePositionAmounts); + const decreaseAmounts = useSelector(selectTradeboxDecreasePositionAmounts); + const defaultTriggerAcceptablePriceImpactBps = useSelector(selectTradeboxDefaultTriggerAcceptablePriceImpactBps); + const selectedTriggerAcceptablePriceImpactBps = useSelector(selectTradeboxSelectedTriggerAcceptablePriceImpactBps); + + const tradeFlags = useSelector(selectTradeboxTradeFlags); + + const { isLimit, isTrigger } = tradeFlags; + + const setDefaultTriggerAcceptablePriceImpactBps = useSelector( + selectTradeboxSetDefaultTriggerAcceptablePriceImpactBps + ); + const setSelectedAcceptablePriceImpactBps = useSelector(selectTradeboxSetSelectedAcceptablePriceImpactBps); + const setFixedTriggerOrderType = useSelector(selectTradeboxSetFixedTriggerOrderType); + const setFixedTriggerThresholdType = useSelector(selectTradeboxSetFixedTriggerThresholdType); + + const tradeboxChanges = useTradeboxChanges(); + + const isAnyValueChanged = Object.values(tradeboxChanges).some(Boolean); + + /** + * Drop selected acceptable price impact when user changes market/pool/trade type/limit price + */ + useEffect(() => { + if (isAnyValueChanged) { + setDefaultTriggerAcceptablePriceImpactBps(undefined); + setSelectedAcceptablePriceImpactBps(undefined); + } + }, [isAnyValueChanged, setDefaultTriggerAcceptablePriceImpactBps, setSelectedAcceptablePriceImpactBps]); + + /** + * Set initial value for limit orders + */ + useEffect(() => { + if ( + isLimit && + increaseAmounts?.acceptablePrice && + defaultTriggerAcceptablePriceImpactBps === undefined && + selectedTriggerAcceptablePriceImpactBps === undefined + ) { + setSelectedAcceptablePriceImpactBps(bigMath.abs(increaseAmounts.acceptablePriceDeltaBps)); + setDefaultTriggerAcceptablePriceImpactBps(bigMath.abs(increaseAmounts.acceptablePriceDeltaBps)); + } + }, [ + defaultTriggerAcceptablePriceImpactBps, + increaseAmounts?.acceptablePrice, + increaseAmounts?.acceptablePriceDeltaBps, + isLimit, + selectedTriggerAcceptablePriceImpactBps, + setDefaultTriggerAcceptablePriceImpactBps, + setSelectedAcceptablePriceImpactBps, + ]); + + /** + * Set initial values from TP/SL orders + */ + useEffect(() => { + if ( + isTrigger && + decreaseAmounts?.triggerThresholdType && + decreaseAmounts?.triggerOrderType && + decreaseAmounts.acceptablePrice !== undefined && + defaultTriggerAcceptablePriceImpactBps === undefined && + selectedTriggerAcceptablePriceImpactBps === undefined + ) { + setFixedTriggerOrderType(decreaseAmounts.triggerOrderType); + setFixedTriggerThresholdType(decreaseAmounts.triggerThresholdType); + setSelectedAcceptablePriceImpactBps(bigMath.abs(decreaseAmounts.recommendedAcceptablePriceDeltaBps)); + setDefaultTriggerAcceptablePriceImpactBps(bigMath.abs(decreaseAmounts.recommendedAcceptablePriceDeltaBps)); + } + }, [ + decreaseAmounts?.acceptablePrice, + decreaseAmounts?.recommendedAcceptablePriceDeltaBps, + decreaseAmounts?.triggerOrderType, + decreaseAmounts?.triggerThresholdType, + defaultTriggerAcceptablePriceImpactBps, + isTrigger, + selectedTriggerAcceptablePriceImpactBps, + setDefaultTriggerAcceptablePriceImpactBps, + setFixedTriggerOrderType, + setFixedTriggerThresholdType, + setSelectedAcceptablePriceImpactBps, + ]); +} diff --git a/src/components/Synthetics/TradeBox/hooks/useTradeboxChanges.ts b/src/components/Synthetics/TradeBox/hooks/useTradeboxChanges.ts new file mode 100644 index 0000000000..5a975a441f --- /dev/null +++ b/src/components/Synthetics/TradeBox/hooks/useTradeboxChanges.ts @@ -0,0 +1,52 @@ +import { usePrevious } from "react-use"; + +import { + selectTradeboxFromTokenAddress, + selectTradeboxLeverage, + selectTradeboxMarketInfo, + selectTradeboxToTokenAddress, + selectTradeboxTradeFlags, + selectTradeboxTriggerPrice, +} from "context/SyntheticsStateContext/selectors/tradeboxSelectors"; +import { useSelector } from "context/SyntheticsStateContext/utils"; + +export function useTradeboxChanges() { + const marketInfo = useSelector(selectTradeboxMarketInfo); + const leverage = useSelector(selectTradeboxLeverage); + const fromTokenAddress = useSelector(selectTradeboxFromTokenAddress); + const toTokenAddress = useSelector(selectTradeboxToTokenAddress); + + const previousMarketIndexTokenAddress = usePrevious(marketInfo?.indexTokenAddress); + const tradeFlags = useSelector(selectTradeboxTradeFlags); + const triggerPrice = useSelector(selectTradeboxTriggerPrice); + const previousLeverage = usePrevious(leverage); + const previousToTokenAddress = usePrevious(toTokenAddress); + const previousFromTokenAddress = usePrevious(fromTokenAddress); + + const previousTradeIsLong = usePrevious(tradeFlags.isLong); + const previousIsLimit = usePrevious(tradeFlags.isLimit); + const previousIsTrigger = usePrevious(tradeFlags.isTrigger); + const previousIsSwap = usePrevious(tradeFlags.isSwap); + + const previousLimitPrice = usePrevious(triggerPrice); + + const isMarketChanged = previousMarketIndexTokenAddress !== marketInfo?.indexTokenAddress; + const isLimitChanged = previousIsLimit !== tradeFlags.isLimit; + const isTriggerChanged = previousIsTrigger !== tradeFlags.isTrigger; + const isTriggerPriceChanged = triggerPrice !== previousLimitPrice; + const isLeverageChanged = previousLeverage !== leverage; + const isFromTokenAddressChanged = previousFromTokenAddress !== fromTokenAddress; + const isToTokenAddressChanged = previousToTokenAddress !== toTokenAddress; + const isDirectionChanged = previousIsSwap !== tradeFlags.isSwap || previousTradeIsLong !== tradeFlags.isLong; + + return { + market: isMarketChanged, + direction: isDirectionChanged, + isLimit: isLimitChanged, + isTrigger: isTriggerChanged, + triggerPrice: isTriggerPriceChanged, + leverage: isLeverageChanged, + fromTokenAddress: isFromTokenAddressChanged, + toTokenAddress: isToTokenAddressChanged, + }; +} diff --git a/src/components/Synthetics/TradeBox/hooks/useTradeboxTPSLReset.ts b/src/components/Synthetics/TradeBox/hooks/useTradeboxTPSLReset.ts new file mode 100644 index 0000000000..28a1a7c144 --- /dev/null +++ b/src/components/Synthetics/TradeBox/hooks/useTradeboxTPSLReset.ts @@ -0,0 +1,43 @@ +import { useEffect } from "react"; +import { usePrevious } from "react-use"; + +import { + selectTradeboxCollateralTokenAddress, + selectTradeboxFromTokenAddress, + selectTradeboxMarketAddress, + selectTradeboxToTokenAddress, + selectTradeboxTradeFlags, +} from "context/SyntheticsStateContext/selectors/tradeboxSelectors"; +import { useSelector } from "context/SyntheticsStateContext/utils"; + +import { useSidecarOrders } from "domain/synthetics/sidecarOrders/useSidecarOrders"; + +export function useTradeboxTPSLReset(setTriggerConsent: (value: boolean) => void) { + const fromTokenAddress = useSelector(selectTradeboxFromTokenAddress); + const toTokenAddress = useSelector(selectTradeboxToTokenAddress); + const marketAddress = useSelector(selectTradeboxMarketAddress); + const collateralToken = useSelector(selectTradeboxCollateralTokenAddress); + const { isLong } = useSelector(selectTradeboxTradeFlags); + + const previouseFromTokenAddress = usePrevious(fromTokenAddress); + const previousToTokenAddress = usePrevious(toTokenAddress); + const previousIsLong = usePrevious(isLong); + const previousMarketAddress = usePrevious(marketAddress); + const previousCollateralToken = usePrevious(collateralToken); + + const { reset } = useSidecarOrders(); + + const shouldResetLimitOrTPSL = + fromTokenAddress !== previouseFromTokenAddress || + toTokenAddress !== previousToTokenAddress || + isLong !== previousIsLong || + marketAddress !== previousMarketAddress || + collateralToken !== previousCollateralToken; + + useEffect(() => { + if (shouldResetLimitOrTPSL) { + setTriggerConsent(false); + reset(); + } + }, [reset, shouldResetLimitOrTPSL, setTriggerConsent]); +} diff --git a/src/components/Synthetics/TradeBox/hooks/useTradeboxTransactions.tsx b/src/components/Synthetics/TradeBox/hooks/useTradeboxTransactions.tsx new file mode 100644 index 0000000000..5fd4f02b9c --- /dev/null +++ b/src/components/Synthetics/TradeBox/hooks/useTradeboxTransactions.tsx @@ -0,0 +1,344 @@ +import { t } from "@lingui/macro"; +import { useSettings } from "context/SettingsContext/SettingsContextProvider"; +import { useSubaccount } from "context/SubaccountContext/SubaccountContext"; +import { useSyntheticsEvents } from "context/SyntheticsEvents"; +import { useTokensData } from "context/SyntheticsStateContext/hooks/globalsHooks"; +import { + selectTradeboxAllowedSlippage, + selectTradeboxCollateralToken, + selectTradeboxDecreasePositionAmounts, + selectTradeboxExecutionFee, + selectTradeboxFixedTriggerOrderType, + selectTradeboxFixedTriggerThresholdType, + selectTradeboxFromTokenAddress, + selectTradeboxIncreasePositionAmounts, + selectTradeboxMarketInfo, + selectTradeboxSwapAmounts, + selectTradeboxToTokenAddress, + selectTradeboxTradeFlags, + selectTradeboxTriggerPrice, +} from "context/SyntheticsStateContext/selectors/tradeboxSelectors"; +import { useSelector } from "context/SyntheticsStateContext/utils"; +import { useUserReferralCode } from "domain/referrals"; +import { + OrderType, + createDecreaseOrderTxn, + createIncreaseOrderTxn, + createSwapOrderTxn, +} from "domain/synthetics/orders"; +import { createWrapOrUnwrapTxn } from "domain/synthetics/orders/createWrapOrUnwrapTxn"; +import { useChainId } from "lib/chains"; +import { helperToast } from "lib/helperToast"; +import { getByKey } from "lib/objects"; +import useWallet from "lib/wallets/useWallet"; +import { useCallback } from "react"; +import { useRequiredActions } from "./useRequiredActions"; +import { useTPSLSummaryExecutionFee } from "./useTPSLSummaryExecutionFee"; + +interface TradeboxTransactionsProps { + setPendingTxns: (txns: any) => void; +} + +export function useTradeboxTransactions({ setPendingTxns }: TradeboxTransactionsProps) { + const { chainId } = useChainId(); + const tokensData = useTokensData(); + const marketInfo = useSelector(selectTradeboxMarketInfo); + const collateralToken = useSelector(selectTradeboxCollateralToken); + const tradeFlags = useSelector(selectTradeboxTradeFlags); + const { isLong, isLimit } = tradeFlags; + const allowedSlippage = useSelector(selectTradeboxAllowedSlippage); + + const fromTokenAddress = useSelector(selectTradeboxFromTokenAddress); + const toTokenAddress = useSelector(selectTradeboxToTokenAddress); + + const swapAmounts = useSelector(selectTradeboxSwapAmounts); + const increaseAmounts = useSelector(selectTradeboxIncreasePositionAmounts); + const decreaseAmounts = useSelector(selectTradeboxDecreasePositionAmounts); + + const { shouldDisableValidationForTesting } = useSettings(); + + const executionFee = useSelector(selectTradeboxExecutionFee); + const triggerPrice = useSelector(selectTradeboxTriggerPrice); + const fixedTriggerThresholdType = useSelector(selectTradeboxFixedTriggerThresholdType); + const fixedTriggerOrderType = useSelector(selectTradeboxFixedTriggerOrderType); + const { account, signer } = useWallet(); + const { referralCodeForTxn } = useUserReferralCode(signer, chainId, account); + + const fromToken = getByKey(tokensData, fromTokenAddress); + const toToken = getByKey(tokensData, toTokenAddress); + + const { requiredActions, createSltpEntries, cancelSltpEntries, updateSltpEntries } = useRequiredActions(); + const { setPendingPosition, setPendingOrder } = useSyntheticsEvents(); + + const { summaryExecutionFee, getExecutionFeeAmountForEntry } = useTPSLSummaryExecutionFee(); + + const subaccount = useSubaccount(summaryExecutionFee?.feeTokenAmount ?? null, requiredActions); + + const onSubmitSwap = useCallback( + function onSubmitSwap() { + if ( + !account || + !tokensData || + !swapAmounts?.swapPathStats || + !fromToken || + !toToken || + !executionFee || + !signer || + typeof allowedSlippage !== "number" + ) { + helperToast.error(t`Error submitting order`); + return Promise.resolve(); + } + + return createSwapOrderTxn(chainId, signer, subaccount, { + account, + fromTokenAddress: fromToken.address, + fromTokenAmount: swapAmounts.amountIn, + swapPath: swapAmounts.swapPathStats?.swapPath, + toTokenAddress: toToken.address, + orderType: isLimit ? OrderType.LimitSwap : OrderType.MarketSwap, + minOutputAmount: swapAmounts.minOutputAmount, + referralCode: referralCodeForTxn, + executionFee: executionFee.feeTokenAmount, + allowedSlippage, + tokensData, + setPendingTxns, + setPendingOrder, + }); + }, + [ + account, + allowedSlippage, + chainId, + executionFee, + fromToken, + isLimit, + referralCodeForTxn, + setPendingOrder, + setPendingTxns, + signer, + subaccount, + swapAmounts, + tokensData, + toToken, + ] + ); + + const onSubmitIncreaseOrder = useCallback( + function onSubmitIncreaseOrder() { + if ( + !tokensData || + !account || + !fromToken || + !collateralToken || + increaseAmounts?.acceptablePrice === undefined || + !executionFee || + !marketInfo || + !signer || + typeof allowedSlippage !== "number" + ) { + helperToast.error(t`Error submitting order`); + return Promise.resolve(); + } + + const commonSecondaryOrderParams = { + account, + marketAddress: marketInfo.marketTokenAddress, + swapPath: [], + allowedSlippage, + initialCollateralAddress: collateralToken.address, + receiveTokenAddress: collateralToken.address, + isLong, + indexToken: marketInfo.indexToken, + }; + + return createIncreaseOrderTxn({ + chainId, + signer, + subaccount, + createIncreaseOrderParams: { + account, + marketAddress: marketInfo.marketTokenAddress, + initialCollateralAddress: fromToken?.address, + initialCollateralAmount: increaseAmounts.initialCollateralAmount, + targetCollateralAddress: collateralToken.address, + collateralDeltaAmount: increaseAmounts.collateralDeltaAmount, + swapPath: increaseAmounts.swapPathStats?.swapPath || [], + sizeDeltaUsd: increaseAmounts.sizeDeltaUsd, + sizeDeltaInTokens: increaseAmounts.sizeDeltaInTokens, + triggerPrice: isLimit ? triggerPrice : undefined, + acceptablePrice: increaseAmounts.acceptablePrice, + isLong, + orderType: isLimit ? OrderType.LimitIncrease : OrderType.MarketIncrease, + executionFee: executionFee.feeTokenAmount, + allowedSlippage, + referralCode: referralCodeForTxn, + indexToken: marketInfo.indexToken, + tokensData, + skipSimulation: isLimit || shouldDisableValidationForTesting, + setPendingTxns: setPendingTxns, + setPendingOrder, + setPendingPosition, + }, + createDecreaseOrderParams: createSltpEntries.map((entry) => { + return { + ...commonSecondaryOrderParams, + initialCollateralDeltaAmount: entry.decreaseAmounts.collateralDeltaAmount ?? 0n, + sizeDeltaUsd: entry.decreaseAmounts.sizeDeltaUsd, + sizeDeltaInTokens: entry.decreaseAmounts.sizeDeltaInTokens, + acceptablePrice: entry.decreaseAmounts.acceptablePrice, + triggerPrice: entry.decreaseAmounts.triggerPrice, + minOutputUsd: 0n, + decreasePositionSwapType: entry.decreaseAmounts.decreaseSwapType, + orderType: entry.decreaseAmounts.triggerOrderType!, + referralCode: referralCodeForTxn, + executionFee: getExecutionFeeAmountForEntry(entry) ?? 0n, + tokensData, + txnType: entry.txnType!, + skipSimulation: isLimit || shouldDisableValidationForTesting, + }; + }), + cancelOrderParams: cancelSltpEntries.map((entry) => ({ + ...commonSecondaryOrderParams, + orderKey: entry.order!.key, + orderType: entry.order!.orderType, + minOutputAmount: 0n, + sizeDeltaUsd: entry.order!.sizeDeltaUsd, + txnType: entry.txnType!, + initialCollateralDeltaAmount: entry.order?.initialCollateralDeltaAmount ?? 0n, + })), + updateOrderParams: updateSltpEntries.map((entry) => ({ + ...commonSecondaryOrderParams, + orderKey: entry.order!.key, + orderType: entry.order!.orderType, + sizeDeltaUsd: (entry.increaseAmounts?.sizeDeltaUsd || entry.decreaseAmounts?.sizeDeltaUsd)!, + acceptablePrice: (entry.increaseAmounts?.acceptablePrice || entry.decreaseAmounts?.acceptablePrice)!, + triggerPrice: (entry.increaseAmounts?.triggerPrice || entry.decreaseAmounts?.triggerPrice)!, + executionFee: getExecutionFeeAmountForEntry(entry) ?? 0n, + minOutputAmount: 0n, + txnType: entry.txnType!, + initialCollateralDeltaAmount: entry.order?.initialCollateralDeltaAmount ?? 0n, + })), + }); + }, + [ + account, + allowedSlippage, + collateralToken, + createSltpEntries, + executionFee, + fromToken, + increaseAmounts, + isLimit, + marketInfo, + referralCodeForTxn, + setPendingOrder, + setPendingPosition, + setPendingTxns, + shouldDisableValidationForTesting, + signer, + subaccount, + tokensData, + triggerPrice, + updateSltpEntries, + cancelSltpEntries, + chainId, + isLong, + getExecutionFeeAmountForEntry, + ] + ); + + const onSubmitDecreaseOrder = useCallback( + function onSubmitDecreaseOrder() { + if ( + !account || + !marketInfo || + !collateralToken || + fixedTriggerOrderType === undefined || + fixedTriggerThresholdType === undefined || + decreaseAmounts?.acceptablePrice === undefined || + decreaseAmounts?.triggerPrice === undefined || + !executionFee || + !tokensData || + !signer || + typeof allowedSlippage !== "number" + ) { + helperToast.error(t`Error submitting order`); + return Promise.resolve(); + } + + return createDecreaseOrderTxn( + chainId, + signer, + subaccount, + { + account, + marketAddress: marketInfo.marketTokenAddress, + swapPath: [], + initialCollateralDeltaAmount: decreaseAmounts.collateralDeltaAmount, + initialCollateralAddress: collateralToken.address, + receiveTokenAddress: collateralToken.address, + triggerPrice: decreaseAmounts.triggerPrice, + acceptablePrice: decreaseAmounts.acceptablePrice, + sizeDeltaUsd: decreaseAmounts.sizeDeltaUsd, + sizeDeltaInTokens: decreaseAmounts.sizeDeltaInTokens, + minOutputUsd: BigInt(0), + isLong, + decreasePositionSwapType: decreaseAmounts.decreaseSwapType, + orderType: fixedTriggerOrderType, + executionFee: executionFee.feeTokenAmount, + allowedSlippage, + referralCode: referralCodeForTxn, + // Skip simulation to avoid EmptyPosition error + // skipSimulation: !existingPosition || shouldDisableValidation, + skipSimulation: true, + indexToken: marketInfo.indexToken, + tokensData, + }, + { + setPendingTxns, + setPendingOrder, + setPendingPosition, + } + ); + }, + [ + account, + allowedSlippage, + chainId, + collateralToken, + decreaseAmounts, + executionFee, + fixedTriggerOrderType, + fixedTriggerThresholdType, + isLong, + marketInfo, + referralCodeForTxn, + setPendingOrder, + setPendingPosition, + setPendingTxns, + signer, + subaccount, + tokensData, + ] + ); + + function onSubmitWrapOrUnwrap() { + if (!account || !swapAmounts || !fromToken || !signer) { + return Promise.resolve(); + } + + return createWrapOrUnwrapTxn(chainId, signer, { + amount: swapAmounts.amountIn, + isWrap: Boolean(fromToken.isNative), + setPendingTxns, + }); + } + + return { + onSubmitSwap, + onSubmitIncreaseOrder, + onSubmitDecreaseOrder, + onSubmitWrapOrUnwrap, + }; +} diff --git a/src/components/Synthetics/TradeBox/hooks/useTriggerOrdersConsent.tsx b/src/components/Synthetics/TradeBox/hooks/useTriggerOrdersConsent.tsx new file mode 100644 index 0000000000..dcd9bcd400 --- /dev/null +++ b/src/components/Synthetics/TradeBox/hooks/useTriggerOrdersConsent.tsx @@ -0,0 +1,25 @@ +import { Trans } from "@lingui/macro"; +import Checkbox from "components/Checkbox/Checkbox"; +import { useState } from "react"; +import { useDecreaseOrdersThatWillBeExecuted } from "./useDecreaseOrdersThatWillBeExecuted"; + +export function useTriggerOrdersConsent() { + const [isTriggerWarningAccepted, setIsTriggerWarningAccepted] = useState(false); + const decreaseOrdersThatWillBeExecuted = useDecreaseOrdersThatWillBeExecuted(); + + if (decreaseOrdersThatWillBeExecuted?.length === 0) { + return [null, true, setIsTriggerWarningAccepted] as const; + } + + const element = ( +
    + + + I am aware of the trigger orders + + +
    + ); + + return [element, isTriggerWarningAccepted, setIsTriggerWarningAccepted] as const; +} diff --git a/src/components/Synthetics/TradeFeesRow/TradeFeesRow.tsx b/src/components/Synthetics/TradeFeesRow/TradeFeesRow.tsx index 06ef34ee90..a608bd2171 100644 --- a/src/components/Synthetics/TradeFeesRow/TradeFeesRow.tsx +++ b/src/components/Synthetics/TradeFeesRow/TradeFeesRow.tsx @@ -41,7 +41,7 @@ type Props = { fundingFeeRateStr?: string; feeDiscountUsd?: bigint; isTop?: boolean; - feesType: TradeFeesType; + feesType: TradeFeesType | null; uiFee?: FeeItem; uiSwapFee?: FeeItem; }; diff --git a/src/components/Synthetics/TradeboxPoolWarnings/TradeboxPoolWarnings.tsx b/src/components/Synthetics/TradeboxPoolWarnings/TradeboxPoolWarnings.tsx index 6e9e06b42d..9cc2aa5600 100644 --- a/src/components/Synthetics/TradeboxPoolWarnings/TradeboxPoolWarnings.tsx +++ b/src/components/Synthetics/TradeboxPoolWarnings/TradeboxPoolWarnings.tsx @@ -2,15 +2,15 @@ import { Trans } from "@lingui/macro"; import { ReactNode, useCallback } from "react"; import { useMarketsInfoData } from "context/SyntheticsStateContext/hooks/globalsHooks"; -import { - useTradeboxExistingOrder, - useTradeboxIncreasePositionAmounts, - useTradeboxSelectedPosition, - useTradeboxState, - useTradeboxTradeFlags, -} from "context/SyntheticsStateContext/hooks/tradeboxHooks"; import { selectIndexTokenStatsMap } from "context/SyntheticsStateContext/selectors/statsSelectors"; -import { selectTradeboxAvailableMarketsOptions } from "context/SyntheticsStateContext/selectors/tradeboxSelectors"; +import { + selectTradeboxAvailableMarketsOptions, + selectTradeboxExistingOrder, + selectTradeboxIncreasePositionAmounts, + selectTradeboxSelectedPosition, + selectTradeboxState, + selectTradeboxTradeFlags, +} from "context/SyntheticsStateContext/selectors/tradeboxSelectors"; import { useSelector } from "context/SyntheticsStateContext/utils"; import { getFeeItem } from "domain/synthetics/fees/utils"; import { Market, MarketInfo } from "domain/synthetics/markets/types"; @@ -32,11 +32,11 @@ export const useTradeboxPoolWarnings = ( ) => { const marketsInfoData = useMarketsInfoData(); const marketsOptions = useSelector(selectTradeboxAvailableMarketsOptions); - const increaseAmounts = useTradeboxIncreasePositionAmounts(); - const { marketInfo, setMarketAddress, setCollateralAddress } = useTradeboxState(); - const { isLong, isIncrease } = useTradeboxTradeFlags(); - const existingOrder = useTradeboxExistingOrder(); - const selectedPosition = useTradeboxSelectedPosition(); + const increaseAmounts = useSelector(selectTradeboxIncreasePositionAmounts); + const { marketInfo, setMarketAddress, setCollateralAddress } = useSelector(selectTradeboxState); + const { isLong, isIncrease } = useSelector(selectTradeboxTradeFlags); + const existingOrder = useSelector(selectTradeboxExistingOrder); + const selectedPosition = useSelector(selectTradeboxSelectedPosition); const hasExistingOrder = Boolean(existingOrder); const hasExistingPosition = Boolean(selectedPosition); const allMarketStats = useSelector(selectIndexTokenStatsMap); diff --git a/src/components/Tooltip/Tooltip.tsx b/src/components/Tooltip/Tooltip.tsx index 58c90c2667..b6dfc0c1df 100644 --- a/src/components/Tooltip/Tooltip.tsx +++ b/src/components/Tooltip/Tooltip.tsx @@ -21,6 +21,7 @@ import { ReactHTML, ReactNode, useCallback, + useEffect, useRef, useState, } from "react"; @@ -28,6 +29,7 @@ import { import { DEFAULT_TOOLTIP_POSITION, TOOLTIP_CLOSE_DELAY, TOOLTIP_OPEN_DELAY } from "config/ui"; import { DEFAULT_ARROW_COLOR, arrowColor } from "./arrowColor"; +import { usePrevious } from "lib/usePrevious"; import "./Tooltip.scss"; export type TooltipPosition = Placement; @@ -119,6 +121,14 @@ export default function Tooltip onOpenChange: setVisible, }); + const previousDisabled = usePrevious(disabled); + + useEffect(() => { + if (disabled && !previousDisabled && visible) { + setVisible(false); + } + }, [disabled, previousDisabled, visible]); + const hover = useHover(context, { enabled: !disabled, delay: { diff --git a/src/context/SyntheticsStateContext/hooks/tradeboxHooks.ts b/src/context/SyntheticsStateContext/hooks/tradeboxHooks.ts deleted file mode 100644 index b759a504d1..0000000000 --- a/src/context/SyntheticsStateContext/hooks/tradeboxHooks.ts +++ /dev/null @@ -1,58 +0,0 @@ -import { - selectTradeboxAvailableTokensOptions, - selectTradeboxChooseSuitableMarket, - selectTradeboxCollateralTokenAddress, - selectTradeboxDecreasePositionAmounts, - selectTradeboxExistingOrder, - selectTradeboxFromTokenAddress, - selectTradeboxGetMaxLongShortLiquidityPool, - selectTradeboxIncreasePositionAmounts, - selectTradeboxLeverage, - selectTradeboxMarketAddress, - selectTradeboxMarketInfo, - selectTradeboxNextLeverageWithoutPnl, - selectTradeboxNextPositionValues, - selectTradeboxNextPositionValuesForDecrease, - selectTradeboxNextPositionValuesForIncrease, - selectTradeboxSelectedPosition, - selectTradeboxSelectedTriggerAcceptablePriceImpactBps, - selectTradeboxSetActivePosition, - selectTradeboxSetToTokenAddress, - selectTradeboxSetTradeConfig, - selectTradeboxState, - selectTradeboxSwapAmounts, - selectTradeboxToTokenAddress, - selectTradeboxTradeFlags, - selectTradeboxTradeMode, - selectTradeboxTradeType, -} from "../selectors/tradeboxSelectors"; -import { useSelector } from "../utils"; - -export const useTradeboxTradeFlags = () => useSelector(selectTradeboxTradeFlags); -export const useTradeboxState = () => useSelector(selectTradeboxState); -export const useTradeboxSelectedPosition = () => useSelector(selectTradeboxSelectedPosition); -export const useTradeboxExistingOrder = () => useSelector(selectTradeboxExistingOrder); -export const useTradeboxLeverage = () => useSelector(selectTradeboxLeverage); -export const useTradeboxFromTokenAddress = () => useSelector(selectTradeboxFromTokenAddress); -export const useTradeboxToTokenAddress = () => useSelector(selectTradeboxToTokenAddress); -export const useTradeboxMarketAddress = () => useSelector(selectTradeboxMarketAddress); -export const useTradeboxCollateralAddress = () => useSelector(selectTradeboxCollateralTokenAddress); -export const useTradeboxAvailableTokensOptions = () => useSelector(selectTradeboxAvailableTokensOptions); -export const useTradeboxSetActivePosition = () => useSelector(selectTradeboxSetActivePosition); -export const useTradeboxTradeType = () => useSelector(selectTradeboxTradeType); -export const useTradeboxTradeMode = () => useSelector(selectTradeboxTradeMode); -export const useTradeboxSetToTokenAddress = () => useSelector(selectTradeboxSetToTokenAddress); -export const useTradeboxSelectedTriggerAcceptablePriceImpactBps = () => - useSelector(selectTradeboxSelectedTriggerAcceptablePriceImpactBps); -export const useTradeboxSetTradeConfig = () => useSelector(selectTradeboxSetTradeConfig); -export const useTradeboxMarketInfo = () => useSelector(selectTradeboxMarketInfo); - -export const useTradeboxSwapAmounts = () => useSelector(selectTradeboxSwapAmounts); -export const useTradeboxNextPositionValuesForIncrease = () => useSelector(selectTradeboxNextPositionValuesForIncrease); -export const useTradeboxNextPositionValuesForDecrease = () => useSelector(selectTradeboxNextPositionValuesForDecrease); -export const useTradeboxIncreasePositionAmounts = () => useSelector(selectTradeboxIncreasePositionAmounts); -export const useTradeboxDecreasePositionAmounts = () => useSelector(selectTradeboxDecreasePositionAmounts); -export const useTradeboxNextPositionValues = () => useSelector(selectTradeboxNextPositionValues); -export const useTradeboxNextLeverageWithoutPnl = () => useSelector(selectTradeboxNextLeverageWithoutPnl); -export const useTradeboxChooseSuitableMarket = () => useSelector(selectTradeboxChooseSuitableMarket); -export const useTradeboxGetMaxLongShortLiquidityPool = () => useSelector(selectTradeboxGetMaxLongShortLiquidityPool); diff --git a/src/context/SyntheticsStateContext/selectors/confirmationBoxSelectors.ts b/src/context/SyntheticsStateContext/selectors/confirmationBoxSelectors.ts deleted file mode 100644 index 9b9e9da8e8..0000000000 --- a/src/context/SyntheticsStateContext/selectors/confirmationBoxSelectors.ts +++ /dev/null @@ -1,88 +0,0 @@ -import { createSelector } from "../utils"; -import { - selectTradeboxSelectedPositionKey, - selectTradeboxMarketInfo, - selectTradeboxTradeFlags, - selectTradeboxCollateralToken, - selectTradeboxIncreasePositionAmounts, - selectTradeboxTriggerPrice, - selectTradeboxSelectedPosition, - selectTradeboxNextPositionValues, -} from "./tradeboxSelectors"; -import { isStopLossOrderType, isLimitDecreaseOrderType, isLimitIncreaseOrderType } from "domain/synthetics/orders"; -import { getPendingMockPosition } from "domain/synthetics/positions"; - -import { makeSelectOrdersByPositionKey } from "../selectors/orderSelectors"; - -export const selectConfirmationBoxExistingSlOrders = createSelector((q) => { - const positionKey = q(selectTradeboxSelectedPositionKey); - const positionOrders = q(makeSelectOrdersByPositionKey(positionKey)); - - return positionOrders?.filter((order) => isStopLossOrderType(order.orderType)); -}); - -export const selectConfirmationBoxExistingTpOrders = createSelector((q) => { - const positionKey = q(selectTradeboxSelectedPositionKey); - const positionOrders = q(makeSelectOrdersByPositionKey(positionKey)); - - return positionOrders?.filter((order) => isLimitDecreaseOrderType(order.orderType)); -}); - -export const selectConfirmationBoxExistingLimitOrders = createSelector((q) => { - const positionKey = q(selectTradeboxSelectedPositionKey); - const positionOrders = q(makeSelectOrdersByPositionKey(positionKey)); - - return positionOrders?.filter((order) => isLimitIncreaseOrderType(order.orderType)); -}); - -export const selectConfirmationBoxMockPosition = createSelector((q) => { - const positionKey = q(selectTradeboxSelectedPositionKey); - const collateralToken = q(selectTradeboxCollateralToken); - const marketInfo = q(selectTradeboxMarketInfo); - const existingPosition = q(selectTradeboxSelectedPosition); - const tradeFlags = q(selectTradeboxTradeFlags); - const nextPositionValues = q(selectTradeboxNextPositionValues); - const increaseAmounts = q(selectTradeboxIncreasePositionAmounts); - const triggerPrice = q(selectTradeboxTriggerPrice); - - if (!positionKey || !marketInfo || !collateralToken || !increaseAmounts || !nextPositionValues) return; - - const mockPosition = getPendingMockPosition({ - isIncrease: tradeFlags.isIncrease, - positionKey, - sizeDeltaUsd: (existingPosition?.sizeInUsd ?? 0n) + (increaseAmounts?.sizeDeltaUsd ?? 0n), - sizeDeltaInTokens: (existingPosition?.sizeInTokens ?? 0n) + (increaseAmounts?.sizeDeltaInTokens ?? 0n), - collateralDeltaAmount: (existingPosition?.collateralAmount ?? 0n) + (increaseAmounts?.collateralDeltaAmount ?? 0n), - updatedAt: Date.now(), - updatedAtBlock: 0n, - }); - - if (!mockPosition) return; - - return { - ...mockPosition, - marketInfo, - indexToken: marketInfo.indexToken, - collateralToken, - pnlToken: tradeFlags.isLong ? marketInfo.longToken : marketInfo.shortToken, - markPrice: nextPositionValues.nextEntryPrice!, - entryPrice: nextPositionValues.nextEntryPrice, - triggerPrice: tradeFlags.isLimit ? triggerPrice : undefined, - liquidationPrice: nextPositionValues.nextLiqPrice, - collateralUsd: increaseAmounts?.initialCollateralUsd, - remainingCollateralUsd: increaseAmounts?.collateralDeltaUsd, - remainingCollateralAmount: increaseAmounts?.collateralDeltaAmount, - netValue: increaseAmounts?.collateralDeltaUsd, - hasLowCollateral: false, - leverage: nextPositionValues.nextLeverage, - leverageWithPnl: nextPositionValues.nextLeverage, - pnl: 0n, - pnlPercentage: 0n, - pnlAfterFees: 0n, - pnlAfterFeesPercentage: 0n, - closingFeeUsd: 0n, - uiFeeUsd: 0n, - pendingFundingFeesUsd: 0n, - pendingClaimableFundingFeesUsd: 0n, - }; -}); diff --git a/src/context/SyntheticsStateContext/selectors/sidecarOrdersSelectors.ts b/src/context/SyntheticsStateContext/selectors/sidecarOrdersSelectors.ts deleted file mode 100644 index b0270bbbf1..0000000000 --- a/src/context/SyntheticsStateContext/selectors/sidecarOrdersSelectors.ts +++ /dev/null @@ -1,131 +0,0 @@ -import { SyntheticsState } from "../SyntheticsStateContextProvider"; -import { createSelector, createSelectorFactory } from "../utils"; -import { - selectTradeboxTradeFlags, - selectTradeboxIncreasePositionAmounts, - selectTradeboxSelectedPosition, -} from "./tradeboxSelectors"; -import { prepareInitialEntries } from "domain/synthetics/sidecarOrders/utils"; -import { - selectConfirmationBoxExistingSlOrders, - selectConfirmationBoxExistingTpOrders, - selectConfirmationBoxExistingLimitOrders, -} from "./confirmationBoxSelectors"; -import { selectSelectedMarketPriceDecimals } from "./statsSelectors"; - -export const selectConfirmationBoxSidecarOrdersSlEntries = (state: SyntheticsState) => - state.confirmationBox.sidecarOrders.slEntries; -export const selectConfirmationBoxSidecarOrdersSetSlEntries = (state: SyntheticsState) => - state.confirmationBox.sidecarOrders.setSlEntries; -export const selectConfirmationBoxSidecarOrdersTpEntries = (state: SyntheticsState) => - state.confirmationBox.sidecarOrders.tpEntries; -export const selectConfirmationBoxSidecarOrdersSetTpEntries = (state: SyntheticsState) => - state.confirmationBox.sidecarOrders.setTpEntries; -export const selectConfirmationBoxSidecarOrdersLimitEntries = (state: SyntheticsState) => - state.confirmationBox.sidecarOrders.limitEntries; -export const selectConfirmationBoxSidecarOrdersSetLimitEntries = (state: SyntheticsState) => - state.confirmationBox.sidecarOrders.setLimitEntries; - -// getters -export const makeSelectConfirmationBoxSidecarOrdersEntries = createSelectorFactory((group: "tp" | "sl" | "limit") => - createSelector(function selectSidecarOrdersEntriesByGroup(q) { - return { - tp: () => q(selectConfirmationBoxSidecarOrdersTpEntries), - sl: () => q(selectConfirmationBoxSidecarOrdersSlEntries), - limit: () => q(selectConfirmationBoxSidecarOrdersLimitEntries), - }[group](); - }) -); - -// setters -export const makeSelectConfirmationBoxSidecarOrdersSetEntries = createSelectorFactory((group: "tp" | "sl" | "limit") => - createSelector(function selectSidecarOrdersEntriesByGroup(q) { - return { - tp: () => q(selectConfirmationBoxSidecarOrdersSetTpEntries), - sl: () => q(selectConfirmationBoxSidecarOrdersSetSlEntries), - limit: () => q(selectConfirmationBoxSidecarOrdersSetLimitEntries), - }[group](); - }) -); - -export const makeSelectConfirmationBoxSidecarOrdersState = createSelectorFactory((group: "tp" | "sl" | "limit") => - createSelector(function selectSidecarOrdersStateByGroup(q) { - const entries = q(makeSelectConfirmationBoxSidecarOrdersEntries(group)); - const setEntries = q(makeSelectConfirmationBoxSidecarOrdersSetEntries(group)); - - return [entries, setEntries] as const; - }) -); - -export const makeSelectConfirmationBoxSidecarOrdersTotalPercentage = createSelectorFactory( - (group: "tp" | "sl" | "limit") => - createSelector(function selectSidecarOrdersTotalPercentageByGroup(q) { - const entries = q(makeSelectConfirmationBoxSidecarOrdersEntries(group)); - - return entries - .filter((entry) => entry.txnType !== "cancel") - .reduce((total, entry) => (entry.percentage?.value ? total + entry.percentage.value : total), 0n); - }) -); - -export const selectConfirmationBoxSidecarOrdersTotalSizeUsd = createSelector((q) => { - const existingPosition = q(selectTradeboxSelectedPosition); - const increaseAmounts = q(selectTradeboxIncreasePositionAmounts); - const limitEntries = q(selectConfirmationBoxSidecarOrdersLimitEntries); - - let result = 0n; - - if (existingPosition?.sizeInUsd !== undefined) { - result = result + existingPosition?.sizeInUsd; - } - - if (increaseAmounts?.sizeDeltaUsd !== undefined) { - result = result + increaseAmounts?.sizeDeltaUsd; - } - - limitEntries?.forEach((e) => { - if (e.txnType !== "cancel") { - result = result + (e.sizeUsd.value ?? 0n); - } - }); - - return result; -}); - -export const selectConfirmationBoxSidecarOrdersExistingSlEntries = createSelector((q) => { - const existingSlOrders = q(selectConfirmationBoxExistingSlOrders); - const { isLong } = q(selectTradeboxTradeFlags); - - const selectedMarketDecimals = q(selectSelectedMarketPriceDecimals); - - return prepareInitialEntries({ - positionOrders: existingSlOrders, - sort: isLong ? "desc" : "asc", - priceDecimals: selectedMarketDecimals, - }); -}); - -export const selectConfirmationBoxSidecarOrdersExistingTpEntries = createSelector((q) => { - const existingTpOrders = q(selectConfirmationBoxExistingTpOrders); - const { isLong } = q(selectTradeboxTradeFlags); - - const selectedMarketDecimals = q(selectSelectedMarketPriceDecimals); - - return prepareInitialEntries({ - positionOrders: existingTpOrders, - sort: isLong ? "asc" : "desc", - priceDecimals: selectedMarketDecimals, - }); -}); - -export const selectConfirmationBoxSidecarOrdersExistingLimitEntries = createSelector((q) => { - const existingLimitOrders = q(selectConfirmationBoxExistingLimitOrders); - - const selectedMarketDecimals = q(selectSelectedMarketPriceDecimals); - - return prepareInitialEntries({ - positionOrders: existingLimitOrders, - sort: "desc", - priceDecimals: selectedMarketDecimals, - }); -}); diff --git a/src/context/SyntheticsStateContext/selectors/tradeboxSelectors/index.ts b/src/context/SyntheticsStateContext/selectors/tradeboxSelectors/index.ts index f776cac92b..973772ba97 100644 --- a/src/context/SyntheticsStateContext/selectors/tradeboxSelectors/index.ts +++ b/src/context/SyntheticsStateContext/selectors/tradeboxSelectors/index.ts @@ -1,11 +1,14 @@ import { BASIS_POINTS_DIVISOR } from "config/factors"; import { convertTokenAddress } from "config/tokens"; +import { SyntheticsState } from "context/SyntheticsStateContext/SyntheticsStateContextProvider"; +import { createSelector, createSelectorDeprecated } from "context/SyntheticsStateContext/utils"; import { estimateExecuteDecreaseOrderGasLimit, estimateExecuteIncreaseOrderGasLimit, estimateExecuteSwapOrderGasLimit, getExecutionFee, } from "domain/synthetics/fees"; +import { estimateOrderOraclePriceCount } from "domain/synthetics/fees/utils/estimateOraclePriceCount"; import { MarketInfo, getAvailableUsdLiquidityForPosition, @@ -18,8 +21,8 @@ import { SwapAmounts, TradeFeesType, TradeType, - getNextPositionExecutionPrice, getMarkPrice, + getNextPositionExecutionPrice, getSwapAmountsByFromValue, getSwapAmountsByToValue, getTradeFees, @@ -38,6 +41,7 @@ import { selectTokensData, selectUiFeeFactor, } from "../globalSelectors"; +import { selectIsPnlInLeverage } from "../settingsSelectors"; import { createTradeFlags, makeSelectDecreasePositionAmounts, @@ -47,16 +51,12 @@ import { makeSelectNextPositionValuesForDecrease, makeSelectNextPositionValuesForIncrease, } from "../tradeSelectors"; -import { SyntheticsState } from "context/SyntheticsStateContext/SyntheticsStateContextProvider"; -import { createSelector, createSelectorDeprecated } from "context/SyntheticsStateContext/utils"; -import { selectIsPnlInLeverage } from "../settingsSelectors"; -import { estimateOrderOraclePriceCount } from "domain/synthetics/fees/utils/estimateOraclePriceCount"; -export * from "./selectTradeboxGetMaxLongShortLiquidityPool"; -export * from "./selectTradeboxChooseSuitableMarket"; +export * from "./selectTradeboxAvailableAndDisabledTokensForCollateral"; export * from "./selectTradeboxAvailableMarketsOptions"; +export * from "./selectTradeboxChooseSuitableMarket"; +export * from "./selectTradeboxGetMaxLongShortLiquidityPool"; export * from "./selectTradeboxRelatedMarketsStats"; -export * from "./selectTradeboxAvailableAndDisabledTokensForCollateral"; const selectOnlyOnTradeboxPage = (s: SyntheticsState, selection: T) => s.pageType === "trade" ? selection : undefined; @@ -68,7 +68,7 @@ export const selectTradeboxFromTokenAddress = (s: SyntheticsState) => s.tradebox export const selectTradeboxToTokenAddress = (s: SyntheticsState) => s.tradebox.toTokenAddress; export const selectTradeboxMarketAddress = (s: SyntheticsState) => selectOnlyOnTradeboxPage(s, s.tradebox.marketAddress); -export const selectTradeboxMarketInfo = (s: SyntheticsState) => s.tradebox.marketInfo; +export const selectTradeboxMarketInfo = (s: SyntheticsState) => s.tradebox?.marketInfo; export const selectTradeboxCollateralTokenAddress = (s: SyntheticsState) => selectOnlyOnTradeboxPage(s, s.tradebox.collateralAddress); export const selectTradeboxCollateralToken = (s: SyntheticsState) => s.tradebox.collateralToken; @@ -82,10 +82,15 @@ export const selectTradeboxFixedTriggerThresholdType = (s: SyntheticsState) => s export const selectTradeboxFixedTriggerOrderType = (s: SyntheticsState) => s.tradebox.fixedTriggerOrderType; export const selectTradeboxDefaultTriggerAcceptablePriceImpactBps = (s: SyntheticsState) => s.tradebox.defaultTriggerAcceptablePriceImpactBps; +export const selectTradeboxSetDefaultTriggerAcceptablePriceImpactBps = (s: SyntheticsState) => + s.tradebox.setDefaultTriggerAcceptablePriceImpactBps; export const selectTradeboxSelectedTriggerAcceptablePriceImpactBps = (s: SyntheticsState) => s.tradebox.selectedTriggerAcceptablePriceImpactBps; export const selectTradeboxSetSelectedAcceptablePriceImpactBps = (s: SyntheticsState) => s.tradebox.setSelectedAcceptablePriceImpactBps; +export const selectTradeboxSetFixedTriggerOrderType = (s: SyntheticsState) => s.tradebox.setFixedTriggerOrderType; +export const selectTradeboxSetFixedTriggerThresholdType = (s: SyntheticsState) => + s.tradebox.setFixedTriggerThresholdType; export const selectTradeboxCloseSizeInputValue = (s: SyntheticsState) => s.tradebox.closeSizeInputValue; export const selectTradeboxTriggerPriceInputValue = (s: SyntheticsState) => s.tradebox.triggerPriceInputValue; export const selectTradeboxTriggerRatioInputValue = (s: SyntheticsState) => s.tradebox.triggerRatioInputValue; @@ -97,6 +102,10 @@ export const selectTradeboxSetToTokenAddress = (s: SyntheticsState) => s.tradebo export const selectTradeboxSetTradeConfig = (s: SyntheticsState) => s.tradebox.setTradeConfig; export const selectTradeboxSetKeepLeverage = (s: SyntheticsState) => s.tradebox.setKeepLeverage; export const selectTradeboxSetCollateralAddress = (s: SyntheticsState) => s.tradebox.setCollateralAddress; +export const selectTradeboxAdvancedOptions = (s: SyntheticsState) => s.tradebox.advancedOptions; +export const selectTradeboxSetAdvancedOptions = (s: SyntheticsState) => s.tradebox.setAdvancedOptions; +export const selectTradeboxAllowedSlippage = (s: SyntheticsState) => s.tradebox.allowedSlippage; +export const selectSetTradeboxAllowedSlippage = (s: SyntheticsState) => s.tradebox.setAllowedSlippage; export const selectTradeboxFindSwapPath = createSelector((q) => { const fromTokenAddress = q(selectTradeboxFromTokenAddress); @@ -815,3 +824,17 @@ export const selectTradeboxMarketsSortMap = createSelector((q) => { return acc; }, {}); }); + +export const selectTradeboxToToken = createSelector((q) => { + const toToken = q(selectTradeboxToTokenAddress); + const tokenData = q(selectTokensData); + + return getByKey(tokenData, toToken); +}); + +export const selectTradeboxFromToken = createSelector((q) => { + const fromToken = q(selectTradeboxFromTokenAddress); + const tokenData = q(selectTokensData); + + return getByKey(tokenData, fromToken); +}); diff --git a/src/context/SyntheticsStateContext/selectors/tradeboxSelectors/selectTradeboxCollateralSpreadInfo.ts b/src/context/SyntheticsStateContext/selectors/tradeboxSelectors/selectTradeboxCollateralSpreadInfo.ts new file mode 100644 index 0000000000..27636a3bdf --- /dev/null +++ b/src/context/SyntheticsStateContext/selectors/tradeboxSelectors/selectTradeboxCollateralSpreadInfo.ts @@ -0,0 +1,35 @@ +import { createSelector } from "context/SyntheticsStateContext/utils"; + +import { HIGH_SPREAD_THRESHOLD } from "config/factors"; +import { + selectTradeboxCollateralToken, + selectTradeboxMarketInfo, +} from "context/SyntheticsStateContext/selectors/tradeboxSelectors"; +import { getIsEquivalentTokens, getSpread } from "domain/tokens"; + +export const selectTradeboxCollateralSpreadInfo = createSelector((q) => { + const marketInfo = q(selectTradeboxMarketInfo); + const collateralToken = q(selectTradeboxCollateralToken); + + const { indexToken } = marketInfo ?? {}; + + if (!indexToken || !collateralToken) { + return undefined; + } + + let totalSpread = getSpread(indexToken.prices); + + if (getIsEquivalentTokens(collateralToken, indexToken)) { + return { + spread: totalSpread, + isHigh: totalSpread > HIGH_SPREAD_THRESHOLD, + }; + } + + totalSpread = totalSpread + getSpread(collateralToken!.prices!); + + return { + spread: totalSpread, + isHigh: totalSpread > HIGH_SPREAD_THRESHOLD, + }; +}); diff --git a/src/context/SyntheticsStateContext/selectors/tradeboxSelectors/selectTradeboxLiquidityInfo.ts b/src/context/SyntheticsStateContext/selectors/tradeboxSelectors/selectTradeboxLiquidityInfo.ts new file mode 100644 index 0000000000..9a4d7fdf52 --- /dev/null +++ b/src/context/SyntheticsStateContext/selectors/tradeboxSelectors/selectTradeboxLiquidityInfo.ts @@ -0,0 +1,56 @@ +import { BASIS_POINTS_DIVISOR_BIGINT } from "config/factors"; +import { + selectTradeboxIncreasePositionAmounts, + selectTradeboxLiquidity, + selectTradeboxMaxLiquidityPath, + selectTradeboxSwapAmounts, + selectTradeboxToToken, + selectTradeboxTradeFlags, +} from "context/SyntheticsStateContext/selectors/tradeboxSelectors"; +import { createSelector } from "context/SyntheticsStateContext/utils"; +import { convertToTokenAmount } from "domain/synthetics/tokens"; +import { bigMath } from "lib/bigmath"; + +const RISK_THRESHOLD_BPS = 5000n; + +export const selectTradeboxLiquidityInfo = createSelector((q) => { + const tradeFlags = q(selectTradeboxTradeFlags); + const swapAmounts = q(selectTradeboxSwapAmounts); + const increaseAmounts = q(selectTradeboxIncreasePositionAmounts); + const toToken = q(selectTradeboxToToken); + const { longLiquidity, shortLiquidity } = q(selectTradeboxLiquidity); + const { maxLiquidity: swapLiquidityUsd } = q(selectTradeboxMaxLiquidityPath); + const { isLong, isLimit, isSwap, isIncrease } = tradeFlags; + + let isLiquidityRisk = false; + let availableLiquidityAmount: bigint | undefined = undefined; + let availableLiquidityUsd: bigint | undefined = undefined; + + if (isLimit) { + if (isSwap && swapAmounts) { + availableLiquidityUsd = swapLiquidityUsd; + + isLiquidityRisk = + bigMath.mulDiv(availableLiquidityUsd, RISK_THRESHOLD_BPS, BASIS_POINTS_DIVISOR_BIGINT) < swapAmounts.usdOut; + availableLiquidityAmount = convertToTokenAmount( + availableLiquidityUsd, + toToken?.decimals, + toToken?.prices.maxPrice + ); + } + + if (isIncrease && increaseAmounts) { + availableLiquidityUsd = isLong ? longLiquidity : shortLiquidity; + + isLiquidityRisk = + bigMath.mulDiv(availableLiquidityUsd!, RISK_THRESHOLD_BPS, BASIS_POINTS_DIVISOR_BIGINT) < + increaseAmounts.sizeDeltaUsd; + } + } + + return { + isLiquidityRisk, + availableLiquidityUsd, + availableLiquidityAmount, + }; +}); diff --git a/src/context/SyntheticsStateContext/selectors/tradeboxSelectors/selectTradeboxSidecarOrders.ts b/src/context/SyntheticsStateContext/selectors/tradeboxSelectors/selectTradeboxSidecarOrders.ts new file mode 100644 index 0000000000..f13b895e27 --- /dev/null +++ b/src/context/SyntheticsStateContext/selectors/tradeboxSelectors/selectTradeboxSidecarOrders.ts @@ -0,0 +1,219 @@ +import { isLimitDecreaseOrderType, isLimitIncreaseOrderType, isStopLossOrderType } from "domain/synthetics/orders"; +import { + selectTradeboxCollateralToken, + selectTradeboxMarketInfo, + selectTradeboxNextPositionValues, + selectTradeboxSelectedPositionKey, + selectTradeboxTriggerPrice, +} from "."; + +import { SyntheticsState } from "context/SyntheticsStateContext/SyntheticsStateContextProvider"; +import { getPendingMockPosition } from "domain/synthetics/positions"; +import { prepareInitialEntries } from "domain/synthetics/sidecarOrders/utils"; +import { createSelector, createSelectorFactory } from "../../utils"; +import { makeSelectOrdersByPositionKey } from "../orderSelectors"; +import { + selectTradeboxIncreasePositionAmounts, + selectTradeboxSelectedPosition, + selectTradeboxTradeFlags, +} from "../tradeboxSelectors"; +import { selectSelectedMarketPriceDecimals } from "../statsSelectors"; + +export const selectTradeboxExistingSlOrders = createSelector((q) => { + const positionKey = q(selectTradeboxSelectedPositionKey); + const positionOrders = q(makeSelectOrdersByPositionKey(positionKey)); + + return positionOrders?.filter((order) => isStopLossOrderType(order.orderType)); +}); + +export const selectTradeboxExistingTpOrders = createSelector((q) => { + const positionKey = q(selectTradeboxSelectedPositionKey); + const positionOrders = q(makeSelectOrdersByPositionKey(positionKey)); + + return positionOrders?.filter((order) => isLimitDecreaseOrderType(order.orderType)); +}); + +export const selectTradeboxExistingLimitOrders = createSelector((q) => { + const positionKey = q(selectTradeboxSelectedPositionKey); + const positionOrders = q(makeSelectOrdersByPositionKey(positionKey)); + + return positionOrders?.filter((order) => isLimitIncreaseOrderType(order.orderType)); +}); + +export const selectTradeboxSidecarOrdersSlEntries = (state: SyntheticsState) => state.tradebox.sidecarOrders.slEntries; +export const selectTradeboxSidecarOrdersSetSlEntries = (state: SyntheticsState) => + state.tradebox.sidecarOrders.setSlEntries; +export const selectTradeboxSidecarOrdersTpEntries = (state: SyntheticsState) => state.tradebox.sidecarOrders.tpEntries; +export const selectTradeboxSidecarOrdersSetTpEntries = (state: SyntheticsState) => + state.tradebox.sidecarOrders.setTpEntries; +export const selectTradeboxSidecarOrdersLimitEntries = (state: SyntheticsState) => + state.tradebox.sidecarOrders.limitEntries; +export const selectTradeboxSidecarOrdersSetLimitEntries = (state: SyntheticsState) => + state.tradebox.sidecarOrders.setLimitEntries; +export const selectTradeboxSidecarEntriesSetIsUntouched = (state: SyntheticsState) => + state.tradebox.sidecarOrders.setIsUntouched; + +export const makeSelectTradeboxSidecarOrdersEntriesIsUntouched = createSelectorFactory((group: "tp" | "sl" | "limit") => + createSelector(function selectSidecarOrdersEntriesIsUntouchedByGroup(q) { + return { + tp: () => q((state) => state.tradebox.sidecarOrders.tpEntriesIsUntouched), + sl: () => q((state) => state.tradebox.sidecarOrders.slEntriesIsUntouched), + limit: () => q((state) => state.tradebox.sidecarOrders.limitEntriesIsUntouched), + }[group](); + }) +); + +// getters +export const makeSelectTradeboxSidecarOrdersEntries = createSelectorFactory((group: "tp" | "sl" | "limit") => + createSelector(function selectSidecarOrdersEntriesByGroup(q) { + return { + tp: () => q(selectTradeboxSidecarOrdersTpEntries), + sl: () => q(selectTradeboxSidecarOrdersSlEntries), + limit: () => q(selectTradeboxSidecarOrdersLimitEntries), + }[group](); + }) +); + +// setters +export const makeSelectTradeboxSidecarOrdersSetEntries = createSelectorFactory((group: "tp" | "sl" | "limit") => + createSelector(function selectSidecarOrdersEntriesByGroup(q) { + return { + tp: () => q(selectTradeboxSidecarOrdersSetTpEntries), + sl: () => q(selectTradeboxSidecarOrdersSetSlEntries), + limit: () => q(selectTradeboxSidecarOrdersSetLimitEntries), + }[group](); + }) +); + +export const makeSelectTradeboxSidecarOrdersState = createSelectorFactory((group: "tp" | "sl" | "limit") => + createSelector(function selectSidecarOrdersStateByGroup(q) { + const entries = q(makeSelectTradeboxSidecarOrdersEntries(group)); + const setEntries = q(makeSelectTradeboxSidecarOrdersSetEntries(group)); + + return [entries, setEntries] as const; + }) +); + +export const makeSelectTradeboxSidecarOrdersTotalPercentage = createSelectorFactory((group: "tp" | "sl" | "limit") => + createSelector(function selectSidecarOrdersTotalPercentageByGroup(q) { + const entries = q(makeSelectTradeboxSidecarOrdersEntries(group)); + + return entries + .filter((entry) => entry.txnType !== "cancel") + .reduce((total, entry) => (entry.percentage?.value ? total + entry.percentage.value : total), 0n); + }) +); + +export const selectTradeboxSidecarOrdersTotalSizeUsd = createSelector((q) => { + const existingPosition = q(selectTradeboxSelectedPosition); + const increaseAmounts = q(selectTradeboxIncreasePositionAmounts); + const limitEntries = q(selectTradeboxSidecarOrdersLimitEntries); + + let result = 0n; + + if (existingPosition?.sizeInUsd !== undefined) { + result = result + existingPosition?.sizeInUsd; + } + + if (increaseAmounts?.sizeDeltaUsd !== undefined) { + result = result + increaseAmounts?.sizeDeltaUsd; + } + + limitEntries?.forEach((e) => { + if (e.txnType !== "cancel") { + result = result + (e.sizeUsd.value ?? 0n); + } + }); + + return result; +}); + +export const selectTradeboxSidecarOrdersExistingSlEntries = createSelector((q) => { + const existingSlOrders = q(selectTradeboxExistingSlOrders); + const { isLong } = q(selectTradeboxTradeFlags); + + const selectedMarketDecimals = q(selectSelectedMarketPriceDecimals); + + return prepareInitialEntries({ + positionOrders: existingSlOrders, + sort: isLong ? "desc" : "asc", + priceDecimals: selectedMarketDecimals, + }); +}); + +export const selectTradeboxSidecarOrdersExistingTpEntries = createSelector((q) => { + const existingTpOrders = q(selectTradeboxExistingTpOrders); + const { isLong } = q(selectTradeboxTradeFlags); + + const selectedMarketDecimals = q(selectSelectedMarketPriceDecimals); + + return prepareInitialEntries({ + positionOrders: existingTpOrders, + sort: isLong ? "asc" : "desc", + priceDecimals: selectedMarketDecimals, + }); +}); + +export const selectTradeboxSidecarOrdersExistingLimitEntries = createSelector((q) => { + const existingLimitOrders = q(selectTradeboxExistingLimitOrders); + + const selectedMarketDecimals = q(selectSelectedMarketPriceDecimals); + + return prepareInitialEntries({ + positionOrders: existingLimitOrders, + sort: "desc", + priceDecimals: selectedMarketDecimals, + }); +}); + +export const selectTradeboxMockPosition = createSelector((q) => { + const positionKey = q(selectTradeboxSelectedPositionKey); + const collateralToken = q(selectTradeboxCollateralToken); + const marketInfo = q(selectTradeboxMarketInfo); + const existingPosition = q(selectTradeboxSelectedPosition); + const tradeFlags = q(selectTradeboxTradeFlags); + const nextPositionValues = q(selectTradeboxNextPositionValues); + const increaseAmounts = q(selectTradeboxIncreasePositionAmounts); + const triggerPrice = q(selectTradeboxTriggerPrice); + + if (!positionKey || !marketInfo || !collateralToken || !increaseAmounts || !nextPositionValues) return; + + const mockPosition = getPendingMockPosition({ + isIncrease: tradeFlags.isIncrease, + positionKey, + sizeDeltaUsd: (existingPosition?.sizeInUsd ?? 0n) + (increaseAmounts?.sizeDeltaUsd ?? 0n), + sizeDeltaInTokens: (existingPosition?.sizeInTokens ?? 0n) + (increaseAmounts?.sizeDeltaInTokens ?? 0n), + collateralDeltaAmount: (existingPosition?.collateralAmount ?? 0n) + (increaseAmounts?.collateralDeltaAmount ?? 0n), + updatedAt: Date.now(), + updatedAtBlock: 0n, + }); + + if (!mockPosition) return; + + return { + ...mockPosition, + marketInfo, + indexToken: marketInfo.indexToken, + collateralToken, + pnlToken: tradeFlags.isLong ? marketInfo.longToken : marketInfo.shortToken, + markPrice: nextPositionValues.nextEntryPrice!, + entryPrice: nextPositionValues.nextEntryPrice, + triggerPrice: tradeFlags.isLimit ? triggerPrice : undefined, + liquidationPrice: nextPositionValues.nextLiqPrice, + collateralUsd: increaseAmounts?.initialCollateralUsd, + remainingCollateralUsd: increaseAmounts?.collateralDeltaUsd, + remainingCollateralAmount: increaseAmounts?.collateralDeltaAmount, + netValue: increaseAmounts?.collateralDeltaUsd, + hasLowCollateral: false, + leverage: nextPositionValues.nextLeverage, + leverageWithPnl: nextPositionValues.nextLeverage, + pnl: 0n, + pnlPercentage: 0n, + pnlAfterFees: 0n, + pnlAfterFeesPercentage: 0n, + closingFeeUsd: 0n, + uiFeeUsd: 0n, + pendingFundingFeesUsd: 0n, + pendingClaimableFundingFeesUsd: 0n, + }; +}); diff --git a/src/domain/synthetics/sidecarOrders/useSidecarEntries.ts b/src/domain/synthetics/sidecarOrders/useSidecarEntries.ts new file mode 100644 index 0000000000..f886e3aa6e --- /dev/null +++ b/src/domain/synthetics/sidecarOrders/useSidecarEntries.ts @@ -0,0 +1,11 @@ +import { useMemo } from "react"; +import { useSidecarOrders } from "./useSidecarOrders"; + +export function useSidecarEntries() { + const { limit, stopLoss, takeProfit } = useSidecarOrders(); + + return useMemo( + () => [...(stopLoss?.entries || []), ...(takeProfit?.entries || []), ...(limit?.entries || [])], + [stopLoss, takeProfit, limit] + ); +} diff --git a/src/domain/synthetics/sidecarOrders/useSidecarOrders.ts b/src/domain/synthetics/sidecarOrders/useSidecarOrders.ts index ed43ccb0e6..461b6ecdce 100644 --- a/src/domain/synthetics/sidecarOrders/useSidecarOrders.ts +++ b/src/domain/synthetics/sidecarOrders/useSidecarOrders.ts @@ -1,33 +1,35 @@ -import { useCallback, useMemo } from "react"; -import { getDecreasePositionAmounts, getIncreasePositionAmounts } from "domain/synthetics/trade"; -import { convertToTokenAmount } from "../tokens"; -import { useSelector } from "context/SyntheticsStateContext/utils"; import { usePositionsConstants, useUiFeeFactor, useUserReferralInfo, } from "context/SyntheticsStateContext/hooks/globalsHooks"; import { - selectTradeboxMarketInfo, - selectTradeboxTradeFlags, selectTradeboxCollateralToken, + selectTradeboxFindSwapPath, selectTradeboxIncreasePositionAmounts, - selectTradeboxTriggerPrice, selectTradeboxMarkPrice, - selectTradeboxSelectedPosition, + selectTradeboxMarketInfo, selectTradeboxNextPositionValues, - selectTradeboxFindSwapPath, + selectTradeboxSelectedPosition, + selectTradeboxTradeFlags, + selectTradeboxTriggerPrice, } from "context/SyntheticsStateContext/selectors/tradeboxSelectors"; import { - selectConfirmationBoxSidecarOrdersExistingSlEntries, - selectConfirmationBoxSidecarOrdersExistingTpEntries, - selectConfirmationBoxSidecarOrdersExistingLimitEntries, -} from "context/SyntheticsStateContext/selectors/sidecarOrdersSelectors"; -import { selectConfirmationBoxMockPosition } from "context/SyntheticsStateContext/selectors/confirmationBoxSelectors"; -import { useSidecarOrdersGroup } from "./useSidecarOrdersGroup"; -import { handleEntryError, getCommonError } from "./utils"; + selectTradeboxMockPosition, + selectTradeboxSidecarEntriesSetIsUntouched, + selectTradeboxSidecarOrdersExistingLimitEntries, + selectTradeboxSidecarOrdersExistingSlEntries, + selectTradeboxSidecarOrdersExistingTpEntries, +} from "context/SyntheticsStateContext/selectors/tradeboxSelectors/selectTradeboxSidecarOrders"; +import { useSelector } from "context/SyntheticsStateContext/utils"; import { OrderType } from "domain/synthetics/orders/types"; -import { SidecarOrderEntry, SidecarSlTpOrderEntryValid, SidecarLimitOrderEntry, SidecarSlTpOrderEntry } from "./types"; +import { getDecreasePositionAmounts, getIncreasePositionAmounts } from "domain/synthetics/trade"; +import { useCallback, useEffect, useMemo } from "react"; +import { convertToTokenAmount } from "../tokens"; +import { SidecarLimitOrderEntry, SidecarOrderEntry, SidecarSlTpOrderEntry, SidecarSlTpOrderEntryValid } from "./types"; +import { useSidecarOrdersGroup } from "./useSidecarOrdersGroup"; +import { getCommonError, handleEntryError } from "./utils"; +import { useSidecarOrdersChanged } from "./useSidecarOrdersChanged"; export * from "./types"; @@ -35,6 +37,7 @@ export function useSidecarOrders() { const userReferralInfo = useUserReferralInfo(); const { minCollateralUsd, minPositionSizeUsd } = usePositionsConstants(); const uiFeeFactor = useUiFeeFactor(); + const setIsUntouched = useSelector(selectTradeboxSidecarEntriesSetIsUntouched); const { isLong, isLimit } = useSelector(selectTradeboxTradeFlags); const findSwapPath = useSelector(selectTradeboxFindSwapPath); @@ -46,9 +49,11 @@ export function useSidecarOrders() { const existingPosition = useSelector(selectTradeboxSelectedPosition); const nextPositionValues = useSelector(selectTradeboxNextPositionValues); - const existingLimitOrderEntries = useSelector(selectConfirmationBoxSidecarOrdersExistingLimitEntries); - const existingSlOrderEntries = useSelector(selectConfirmationBoxSidecarOrdersExistingSlEntries); - const existingTpOrderEntries = useSelector(selectConfirmationBoxSidecarOrdersExistingTpEntries); + const existingLimitOrderEntries = useSelector(selectTradeboxSidecarOrdersExistingLimitEntries); + const existingSlOrderEntries = useSelector(selectTradeboxSidecarOrdersExistingSlEntries); + const existingTpOrderEntries = useSelector(selectTradeboxSidecarOrdersExistingTpEntries); + + const doesEntriesChanged = useSidecarOrdersChanged(); const handleLimitErrors = useCallback( (entry: SidecarLimitOrderEntry) => @@ -152,7 +157,7 @@ export function useSidecarOrders() { enablePercentage: true, }); - const mockPositionInfo = useSelector(selectConfirmationBoxMockPosition); + const mockPositionInfo = useSelector(selectTradeboxMockPosition); const getIncreaseAmountsFromEntry = useCallback( ({ sizeUsd, price, order }: SidecarOrderEntry) => { @@ -348,9 +353,29 @@ export function useSidecarOrders() { }; }, [getDecreaseAmountsFromEntry, takeProfitEntriesInfo, canCalculatePnL]); + const reset = useCallback(() => { + limit.reset(); + stopLoss.reset(); + takeProfit.reset(); + }, [limit, stopLoss, takeProfit]); + + useEffect(() => { + if (doesEntriesChanged) { + reset(); + /** + * We need to reset the untouched state to false, to prevent next init on [./useSidecarOrdersGroup.ts#L115] + * from UI perspective this prevents cursor focus loose without input change + */ + setIsUntouched("limit", false); + setIsUntouched("sl", false); + setIsUntouched("tp", false); + } + }, [doesEntriesChanged, reset, setIsUntouched]); + return { stopLoss, takeProfit, limit, + reset, }; } diff --git a/src/domain/synthetics/sidecarOrders/useSidecarOrdersChanged.ts b/src/domain/synthetics/sidecarOrders/useSidecarOrdersChanged.ts new file mode 100644 index 0000000000..1b465245d3 --- /dev/null +++ b/src/domain/synthetics/sidecarOrders/useSidecarOrdersChanged.ts @@ -0,0 +1,50 @@ +import { usePrevious } from "react-use"; +import { isEqual } from "lodash"; + +import { + selectTradeboxSidecarOrdersExistingLimitEntries, + selectTradeboxSidecarOrdersExistingSlEntries, + selectTradeboxSidecarOrdersExistingTpEntries, +} from "context/SyntheticsStateContext/selectors/tradeboxSelectors/selectTradeboxSidecarOrders"; +import { useSelector } from "context/SyntheticsStateContext/utils"; + +import { InitialEntry } from "./types"; +import { useMemo } from "react"; + +function isEqualOrders(a?: InitialEntry[], b?: InitialEntry[]) { + return ( + a?.length === b?.length && + a?.every((aOrder, index) => { + const bOrder = b?.[index]; + if (!bOrder) { + return false; + } + return isEqual(aOrder.sizeUsd, bOrder.sizeUsd) && isEqual(aOrder.price, bOrder.price); + }) + ); +} + +export function useSidecarOrdersChanged() { + const existingLimitOrderEntries = useSelector(selectTradeboxSidecarOrdersExistingLimitEntries); + const existingSlOrderEntries = useSelector(selectTradeboxSidecarOrdersExistingSlEntries); + const existingTpOrderEntries = useSelector(selectTradeboxSidecarOrdersExistingTpEntries); + + const previousExistingLimitOrderEntries = usePrevious(existingLimitOrderEntries); + const previousExistingSlOrderEntries = usePrevious(existingSlOrderEntries); + const previousExistingTpOrderEntries = usePrevious(existingTpOrderEntries); + + return useMemo( + () => + !isEqualOrders(previousExistingLimitOrderEntries, existingLimitOrderEntries) || + !isEqualOrders(previousExistingSlOrderEntries, existingSlOrderEntries) || + !isEqualOrders(previousExistingTpOrderEntries, existingTpOrderEntries), + [ + existingLimitOrderEntries, + existingSlOrderEntries, + existingTpOrderEntries, + previousExistingLimitOrderEntries, + previousExistingSlOrderEntries, + previousExistingTpOrderEntries, + ] + ); +} diff --git a/src/domain/synthetics/sidecarOrders/useSidecarOrdersGroup.ts b/src/domain/synthetics/sidecarOrders/useSidecarOrdersGroup.ts index 268e5d0594..8fff617f5d 100644 --- a/src/domain/synthetics/sidecarOrders/useSidecarOrdersGroup.ts +++ b/src/domain/synthetics/sidecarOrders/useSidecarOrdersGroup.ts @@ -1,16 +1,17 @@ -import { useCallback, useEffect, useMemo, SetStateAction, Dispatch } from "react"; -import { USD_DECIMALS } from "lib/legacy"; -import { usePrevious } from "lib/usePrevious"; -import { useSelector } from "context/SyntheticsStateContext/utils"; import { - makeSelectConfirmationBoxSidecarOrdersState, - makeSelectConfirmationBoxSidecarOrdersTotalPercentage, -} from "context/SyntheticsStateContext/selectors/sidecarOrdersSelectors"; -import { selectConfirmationBoxSidecarOrdersTotalSizeUsd } from "context/SyntheticsStateContext/selectors/sidecarOrdersSelectors"; -import { MAX_PERCENTAGE, PERCENTAGE_DECEMALS, getDefaultEntryField, getDefaultEntry } from "./utils"; -import { SidecarOrderEntryBase, EntryField, SidecarOrderEntryGroupBase, GroupPrefix } from "./types"; -import useEffectOnce from "lib/useEffectOnce"; + makeSelectTradeboxSidecarOrdersEntriesIsUntouched, + makeSelectTradeboxSidecarOrdersState, + makeSelectTradeboxSidecarOrdersTotalPercentage, + selectTradeboxSidecarEntriesSetIsUntouched, + selectTradeboxSidecarOrdersTotalSizeUsd, +} from "context/SyntheticsStateContext/selectors/tradeboxSelectors/selectTradeboxSidecarOrders"; +import { useSelector } from "context/SyntheticsStateContext/utils"; import { bigMath } from "lib/bigmath"; +import { USD_DECIMALS } from "lib/legacy"; +import { usePrevious } from "lib/usePrevious"; +import { Dispatch, SetStateAction, useCallback, useEffect, useMemo } from "react"; +import { EntryField, GroupPrefix, SidecarOrderEntryBase, SidecarOrderEntryGroupBase } from "./types"; +import { MAX_PERCENTAGE, PERCENTAGE_DECEMALS, getDefaultEntry, getDefaultEntryField } from "./utils"; export function useSidecarOrdersGroup({ prefix, @@ -25,7 +26,9 @@ export function useSidecarOrdersGroup({ canAddEntry?: boolean; enablePercentage?: boolean; }): SidecarOrderEntryGroupBase { - const totalPositionSizeUsd = useSelector(selectConfirmationBoxSidecarOrdersTotalSizeUsd); + const isUntouched = useSelector(makeSelectTradeboxSidecarOrdersEntriesIsUntouched(prefix)); + const setIsUntouched = useSelector(selectTradeboxSidecarEntriesSetIsUntouched); + const totalPositionSizeUsd = useSelector(selectTradeboxSidecarOrdersTotalSizeUsd); const getPercentageBySizeUsd = useCallback( (sizeUsd: bigint | null) => { @@ -105,19 +108,22 @@ export function useSidecarOrdersGroup({ return []; }, [initialEntries, prefix, canAddEntry, enablePercentage, errorHandler, recalculateEntryByField]); - const ordersState = useSelector(makeSelectConfirmationBoxSidecarOrdersState(prefix)); + const ordersState = useSelector(makeSelectTradeboxSidecarOrdersState(prefix)); const [entries, setEntries] = ordersState as any as [T[], Dispatch>]; - useEffectOnce(() => { - setEntries(initialState); - }); + useEffect(() => { + if (isUntouched) { + setIsUntouched(prefix, false); + setEntries(initialState); + } + }, [initialState, setEntries, isUntouched, setIsUntouched, prefix]); useEffect(() => { setEntries((prevEntries) => prevEntries.map((entry) => errorHandler(entry))); }, [errorHandler, setEntries]); - const totalPercentage = useSelector(makeSelectConfirmationBoxSidecarOrdersTotalPercentage(prefix)); + const totalPercentage = useSelector(makeSelectTradeboxSidecarOrdersTotalPercentage(prefix)); const clampEntryPercentage = useCallback( (entries: SidecarOrderEntryBase[], entry: T) => { @@ -139,6 +145,7 @@ export function useSidecarOrdersGroup({ const leftPercentage = MAX_PERCENTAGE - totalPercentage; if (leftPercentage > 0) { + setIsUntouched(prefix, false); setEntries((prevEntries) => [ ...prevEntries, recalculateEntryByField( @@ -150,10 +157,11 @@ export function useSidecarOrdersGroup({ ), ]); } - }, [totalPercentage, enablePercentage, prefix, setEntries, recalculateEntryByField]); + }, [totalPercentage, enablePercentage, prefix, setEntries, recalculateEntryByField, setIsUntouched]); const updateEntry = useCallback( (id: string, field: "price" | "sizeUsd" | "percentage", value: string) => { + setIsUntouched(prefix, false); setEntries((prevEntries) => { return prevEntries.map((entry) => { if (entry.id !== id) { @@ -180,13 +188,17 @@ export function useSidecarOrdersGroup({ }); }); }, - [enablePercentage, clampEntryPercentage, setEntries, recalculateEntryByField, errorHandler] + [enablePercentage, clampEntryPercentage, setEntries, recalculateEntryByField, errorHandler, prefix, setIsUntouched] ); - const reset = useCallback(() => setEntries(initialState), [initialState, setEntries]); + const reset = useCallback(() => { + setEntries(initialState); + setIsUntouched(prefix, true); + }, [initialState, setEntries, setIsUntouched, prefix]); const deleteEntry = useCallback( (id: string) => { + setIsUntouched(prefix, false); setEntries((prevEntries) => { const isLastEntry = prevEntries.filter((entry) => entry.txnType !== "cancel").length <= 1; @@ -211,7 +223,7 @@ export function useSidecarOrdersGroup({ }, []); }); }, - [prefix, canAddEntry, enablePercentage, setEntries] + [prefix, canAddEntry, enablePercentage, setEntries, setIsUntouched] ); const prevTotalPositionSizeUsd = usePrevious(totalPositionSizeUsd); diff --git a/src/domain/synthetics/trade/usePriceImpactWarningState.ts b/src/domain/synthetics/trade/usePriceImpactWarningState.ts index 68ea550073..f008786e3c 100644 --- a/src/domain/synthetics/trade/usePriceImpactWarningState.ts +++ b/src/domain/synthetics/trade/usePriceImpactWarningState.ts @@ -1,11 +1,11 @@ import { HIGH_POSITION_IMPACT_BPS, HIGH_SWAP_IMPACT_BPS } from "config/factors"; +import { bigMath } from "lib/bigmath"; import { mustNeverExist } from "lib/types"; import { usePrevious } from "lib/usePrevious"; import { useEffect, useMemo, useState } from "react"; import shallowEqual from "shallowequal"; import { FeeItem } from "../fees"; import { TradeFlags } from "./types"; -import { bigMath } from "lib/bigmath"; export type PriceImpactWarningState = ReturnType; @@ -17,7 +17,7 @@ export function usePriceImpactWarningState({ }: { positionPriceImpact?: FeeItem; swapPriceImpact?: FeeItem; - place: "tradeBox" | "positionSeller" | "confirmationBox"; + place: "tradeBox" | "positionSeller"; tradeFlags: TradeFlags; }) { const [isHighPositionImpactAccepted, setIsHighPositionImpactAccepted] = useState(false); @@ -69,14 +69,14 @@ export function usePriceImpactWarningState({ if (place === "tradeBox") { validationError = isHighSwapImpact && !isHighSwapImpactAccepted; - shouldShowWarning = isHighSwapImpact; shouldShowWarningForSwap = isHighSwapImpact; - } else if (place === "confirmationBox") { + if (!tradeFlags.isSwap) { - validationError = isHighPositionImpact && !isHighPositionImpactAccepted; - shouldShowWarning = isHighPositionImpact; + validationError = validationError || (isHighPositionImpact && !isHighPositionImpactAccepted); shouldShowWarningForPosition = isHighPositionImpact; } + + shouldShowWarning = isHighSwapImpact || isHighPositionImpact; } else if (place === "positionSeller") { validationError = (isHighPositionImpact && !isHighPositionImpactAccepted) || (isHighSwapImpact && !isHighSwapImpactAccepted); diff --git a/src/domain/synthetics/trade/useSidecarOrdersState.ts b/src/domain/synthetics/trade/useSidecarOrdersState.ts index a8f569f4a7..426bd3920d 100644 --- a/src/domain/synthetics/trade/useSidecarOrdersState.ts +++ b/src/domain/synthetics/trade/useSidecarOrdersState.ts @@ -1,4 +1,4 @@ -import { useMemo, useState } from "react"; +import { useCallback, useMemo, useState } from "react"; import { SidecarOrderEntry } from "domain/synthetics/sidecarOrders/useSidecarOrders"; @@ -9,6 +9,23 @@ export function useSidecarOrdersState() { const [tpEntries, setTpEntries] = useState([]); const [limitEntries, setLimitEntries] = useState([]); + const [slEntriesIsUntouched, setSlEntriesIsUntouched] = useState(true); + const [tpEntriesIsUntouched, setTpEntriesIsUntouched] = useState(true); + const [limitEntriesIsUntouched, setLimitEntriesIsUntouched] = useState(true); + + const setIsUntouched = useCallback( + (group: "tp" | "sl" | "limit", value: boolean) => { + if (group === "tp") { + setTpEntriesIsUntouched(value); + } else if (group === "sl") { + setSlEntriesIsUntouched(value); + } else { + setLimitEntriesIsUntouched(value); + } + }, + [setTpEntriesIsUntouched, setSlEntriesIsUntouched, setLimitEntriesIsUntouched] + ); + return useMemo( () => ({ slEntries, @@ -17,7 +34,22 @@ export function useSidecarOrdersState() { setTpEntries, limitEntries, setLimitEntries, + slEntriesIsUntouched, + tpEntriesIsUntouched, + limitEntriesIsUntouched, + setIsUntouched, }), - [slEntries, tpEntries, limitEntries, setSlEntries, setTpEntries, setLimitEntries] + [ + slEntries, + tpEntries, + limitEntries, + setSlEntries, + setTpEntries, + setLimitEntries, + slEntriesIsUntouched, + tpEntriesIsUntouched, + limitEntriesIsUntouched, + setIsUntouched, + ] ); } diff --git a/src/domain/synthetics/trade/useTradeboxState.ts b/src/domain/synthetics/trade/useTradeboxState.ts index 305fb10844..45e9cb9c1a 100644 --- a/src/domain/synthetics/trade/useTradeboxState.ts +++ b/src/domain/synthetics/trade/useTradeboxState.ts @@ -9,6 +9,7 @@ import { getLeverageKey, getSyntheticsTradeOptionsKey, } from "config/localStorage"; +import { useSettings } from "context/SettingsContext/SettingsContextProvider"; import { getToken, isSimilarToken } from "config/tokens"; import { createTradeFlags } from "context/SyntheticsStateContext/selectors/tradeSelectors"; import { createGetMaxLongShortLiquidityPool } from "context/SyntheticsStateContext/selectors/tradeboxSelectors"; @@ -24,9 +25,10 @@ import { PositionInfo, PositionsInfoData } from "../positions"; import { TokensData } from "../tokens"; import { TradeMode, TradeType, TriggerThresholdType } from "./types"; import { useAvailableTokenOptions } from "./useAvailableTokenOptions"; +import { useSidecarOrdersState } from "./useSidecarOrdersState"; import { MarketInfo } from "domain/synthetics/markets"; -type TradeStage = "trade" | "confirmation" | "processing"; +export type TradeStage = "trade" | "processing"; type TradeOptions = { tradeType?: TradeType; @@ -39,6 +41,11 @@ type TradeOptions = { export type TradeboxState = ReturnType; +export interface TradeboxAdvancedOptions { + advancedDisplay: boolean; + limitOrTPSL: boolean; +} + type StoredTradeOptions = { tradeType: TradeType; tradeMode: TradeMode; @@ -59,6 +66,7 @@ type StoredTradeOptions = { short?: string; }; }; + advanced?: TradeboxAdvancedOptions; }; const INITIAL_SYNTHETICS_TRADE_OPTIONS_STATE: StoredTradeOptions = { @@ -67,6 +75,10 @@ const INITIAL_SYNTHETICS_TRADE_OPTIONS_STATE: StoredTradeOptions = { tokens: {}, markets: {}, collaterals: {}, + advanced: { + advancedDisplay: false, + limitOrTPSL: false, + }, }; export function useTradeboxState( @@ -131,7 +143,10 @@ export function useTradeboxState( [chainId] ); + const { savedAllowedSlippage } = useSettings(); const [syncedChainId, setSyncedChainId] = useState(undefined); + const [allowedSlippage, setAllowedSlippage] = useState(savedAllowedSlippage); + useEffect( function handleChainChange() { if (syncedChainId === chainId) { @@ -229,6 +244,10 @@ export function useTradeboxState( const [triggerPriceInputValue, setTriggerPriceInputValue] = useState(""); const [triggerRatioInputValue, setTriggerRatioInputValue] = useState(""); + const [advancedOptions, setAdvancedOptions] = useSafeState( + storedOptions.advanced ?? INITIAL_SYNTHETICS_TRADE_OPTIONS_STATE.advanced + ); + const { swapTokens } = availableTokensOptions; const tradeType = storedOptions?.tradeType; @@ -519,6 +538,8 @@ export function useTradeboxState( [setStoredOptions] ); + const sidecarOrders = useSidecarOrdersState(); + useEffect( function fallbackStoredOptions() { if (!enabled) { @@ -576,6 +597,15 @@ export function useTradeboxState( [enabled, fromTokenAddress, isSwap, setFromTokenAddress, setToTokenAddress, swapTokens, toTokenAddress] ); + useEffect(() => { + setStoredOptionsOnChain((oldState) => { + return { + ...oldState, + advanced: advancedOptions, + }; + }); + }, [advancedOptions, setStoredOptionsOnChain]); + return { tradeType, tradeMode, @@ -588,6 +618,7 @@ export function useTradeboxState( collateralToken, availableTokensOptions, avaialbleTradeModes, + sidecarOrders, isSwitchTokensAllowed, setActivePosition, setFromTokenAddress, @@ -626,6 +657,10 @@ export function useTradeboxState( setIsLeverageEnabled, keepLeverage, setKeepLeverage, + advancedOptions, + setAdvancedOptions, + allowedSlippage, + setAllowedSlippage, }; } diff --git a/src/domain/synthetics/trade/utils/decrease.ts b/src/domain/synthetics/trade/utils/decrease.ts index 0c95a18390..1b516f564f 100644 --- a/src/domain/synthetics/trade/utils/decrease.ts +++ b/src/domain/synthetics/trade/utils/decrease.ts @@ -13,6 +13,7 @@ import { import { TokenData, convertToTokenAmount, convertToUsd } from "domain/synthetics/tokens"; import { getIsEquivalentTokens } from "domain/tokens"; import { ethers } from "ethers"; +import { bigMath } from "lib/bigmath"; import { DUST_USD } from "lib/legacy"; import { applyFactor, getBasisPoints, roundUpDivision } from "lib/numbers"; import { DecreasePositionAmounts, NextPositionValues } from "../types"; @@ -24,7 +25,6 @@ import { getTriggerThresholdType, } from "./prices"; import { getSwapStats } from "./swapStats"; -import { bigMath } from "lib/bigmath"; export function getDecreasePositionAmounts(p: { marketInfo: MarketInfo; @@ -354,8 +354,11 @@ export function getDecreasePositionAmounts(p: { }); values.collateralDeltaUsd = - // https://app.asana.com/0/1204313444805313/1207549197964321/f - leverageWithoutPnl !== undefined + /** + * 1. @see https://app.asana.com/0/1204313444805313/1207549197964321/f + * 2. leverageWithoutPnl may be zero if sizeInUsd is defaulted to 0n when position not ready yet + */ + leverageWithoutPnl !== undefined && leverageWithoutPnl !== 0n ? remainingCollateralUsd - bigMath.mulDiv(nextSizeInUsd, BASIS_POINTS_DIVISOR_BIGINT, leverageWithoutPnl) : 0n; values.collateralDeltaAmount = convertToTokenAmount( diff --git a/src/locales/de/messages.po b/src/locales/de/messages.po index ec77e48b8d..21ab7d5708 100644 --- a/src/locales/de/messages.po +++ b/src/locales/de/messages.po @@ -79,7 +79,6 @@ msgid "Subaccount generation failed" msgstr "" #: src/components/Exchange/ConfirmationBox.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx msgid "{existingTriggerOrderLength, plural, one {You have an active trigger order that might execute immediately after you open this position. Please cancel the order or accept the confirmation to continue.} other {You have # active trigger orders that might execute immediately after you open this position. Please cancel the orders or accept the confirmation to continue.}}" msgstr "{existingTriggerOrderLength, plural, one {Du hast eine aktiven Trigger-Order, die unmittelbar nach dem Öffnen dieser Position ausgeführt werden könnte. Bitte storniere den Auftrag oder akzeptiere die Bestätigung, um fortzufahren.} other {Du hast # aktive Trigger-Orders, die sofort ausgeführt werden könnten, nachdem du diese Position eröffnet hast. Bitte storniere die Aufträge oder akzeptieren die Bestätigung, um fortzufahren.}}" @@ -155,6 +154,10 @@ msgstr "{0} liegt über der Zielgewichtung.<0/><1/>Erhalte niedrigere Gebühren, msgid "Withdrawal error." msgstr "" +#: src/components/Synthetics/TradeBox/TradeBox.tsx +msgid "The execution price will constantly vary based on fees and price impact to guarantee that you receive the minimum receive amount." +msgstr "" + #: src/pages/Home/Home.js msgid "Decentralized<0/>Perpetual Exchange" msgstr "Dezentralisierte<0/>Perpetual Börse" @@ -236,7 +239,6 @@ msgstr "" #: src/components/Glp/GlpSwap.js #: src/components/Glp/GlpSwap.js #: src/components/Glp/GlpSwap.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/OrderEditor/OrderEditor.tsx #: src/components/Synthetics/TradeFeesRow/TradeFeesRow.tsx msgid "Fees" @@ -403,8 +405,6 @@ msgid "Insufficient liquidity in the {0} market pool. Select a different pool fo msgstr "" #: src/components/Exchange/ConfirmationBox.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx msgid "Confirm Limit Order" msgstr "" @@ -515,6 +515,7 @@ msgstr "" msgid "Incentives are airdropped weekly." msgstr "" +#: src/components/Synthetics/AcceptablePriceImpactInputRow/AcceptablePriceImpactInputRow.tsx #: src/components/Synthetics/AcceptablePriceImpactInputRow/AcceptablePriceImpactInputRow.tsx msgid "Acceptable Price Impact" msgstr "" @@ -527,10 +528,6 @@ msgstr "Zu Metamask hinzufügen" msgid "Insufficient staked tokens" msgstr "" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -msgid "New Collateral" -msgstr "" - #: src/lib/wallets/connecters/binanceW3W/binanceWallet.ts msgid "Tap [Create Wallet] to start using your Web3 Wallet." msgstr "Tippe auf [Wallet erstellen], um dein Web3 Wallet zu verwenden." @@ -721,8 +718,6 @@ msgstr "" #: src/components/Exchange/SwapBox.js #: src/components/Glp/GlpSwap.js #: src/components/Glp/GlpSwap.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/GmSwap/GmConfirmationBox/GmConfirmationBox.tsx #: src/components/Synthetics/GmSwap/GmConfirmationBox/GmConfirmationBox.tsx #: src/components/Synthetics/GmSwap/GmSwapBox/GmSwapBox.tsx @@ -747,8 +742,8 @@ msgstr "GMX Governance Seite" msgid "Decentralized Money Market" msgstr "" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/OrderList/filters/OrderTypeFilter.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/LimitAndTPSLRows.tsx #: src/domain/synthetics/positions/utils.ts msgid "Stop-Loss" msgstr "" @@ -774,10 +769,6 @@ msgstr "{0} GLP sind für Vesting reserviert worden." msgid "Buy with {0}" msgstr "Kaufe mit {0}" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -msgid "You have an existing position with {0} as collateral. This Order will not be valid for that Position." -msgstr "Du hast eine bestehende Position mit {0} als Kollateral. Dieser Auftrag ist für diese Position nicht gültig." - #: src/components/Referrals/JoinReferralCode.js msgid "Adding..." msgstr "Hinzufügen..." @@ -891,8 +882,8 @@ msgid "Unstake completed!" msgstr "" #: src/components/Exchange/ConfirmationBox.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/OrderEditor/OrderEditor.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/MinReceiveRow.tsx msgid "Min. Receive" msgstr "Min. Empfangen" @@ -931,8 +922,6 @@ msgstr "" #: src/components/Exchange/OrdersList.js #: src/components/Exchange/PositionsList.js #: src/components/Exchange/PositionsList.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/MarketStats/MarketStats.tsx #: src/components/Synthetics/OrderItem/OrderItem.tsx #: src/components/Synthetics/PositionItem/PositionItem.tsx @@ -1191,8 +1180,7 @@ msgstr "Telegram-Bot für GMX-Positionsupdates" msgid "account" msgstr "Konto" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/TradeBox/TradeBox.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/AdvancedDisplayRows.tsx msgid "Keep leverage at {0}" msgstr "" @@ -1299,6 +1287,10 @@ msgstr "" msgid "Select Positions" msgstr "" +#: src/components/Synthetics/TradeBox/hooks/useCollateralInTooltipContent.tsx +msgid "You will be long {indexSymbol} from your long position, while being long {collateralSymbol} from your {collateralSymbol} collateral. The liquidation price will vary based on the price of {collateralSymbol}." +msgstr "" + #: src/components/Referrals/AffiliatesStats.tsx #: src/components/Referrals/AffiliatesStats.tsx #: src/components/Referrals/TradersStats.tsx @@ -1552,7 +1544,7 @@ msgstr "" msgid "Mark" msgstr "" -#: src/components/Synthetics/PositionSeller/PositionSeller.tsx +#: src/components/Synthetics/PositionSeller/PositionSellerAdvancedDisplayRows.tsx msgid "Keep leverage at {keepLeverageAtValue}" msgstr "" @@ -1708,7 +1700,7 @@ msgstr "Überprüfung des Codes..." msgid "GM Pools" msgstr "" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/AvailableLiquidityRow.tsx msgid "The order will only execute if the price conditions are met and there is sufficient liquidity." msgstr "" @@ -1747,16 +1739,14 @@ msgstr "" #: src/components/Exchange/PositionsList.js #: src/components/Synthetics/Claims/ClaimsHistory.tsx #: src/components/Synthetics/Claims/ClaimsHistory.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/OrderEditor/OrderEditor.tsx #: src/components/Synthetics/OrderItem/OrderItem.tsx #: src/components/Synthetics/OrderList/OrderList.tsx -#: src/components/Synthetics/PositionEditor/PositionEditor.tsx +#: src/components/Synthetics/PositionEditor/PositionEditorAdvancedRows.tsx #: src/components/Synthetics/PositionItem/PositionItem.tsx #: src/components/Synthetics/PositionList/PositionList.tsx -#: src/components/Synthetics/PositionSeller/PositionSeller.tsx -#: src/components/Synthetics/TradeBox/TradeBox.tsx +#: src/components/Synthetics/PositionSeller/PositionSellerAdvancedDisplayRows.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/AdvancedDisplayRows.tsx #: src/components/Synthetics/TradeHistory/TradeHistory.tsx #: src/components/Synthetics/TradeHistory/useDownloadAsCsv.tsx #: src/pages/LeaderboardPage/components/LeaderboardPositionsTable.tsx @@ -1894,6 +1884,11 @@ msgstr "" msgid "{0} Approved!" msgstr "{0} Genehmigt!" +#: src/components/Synthetics/PositionEditor/PositionEditorAdvancedRows.tsx +#: src/components/Synthetics/PositionSeller/PositionSellerAdvancedDisplayRows.tsx +msgid "Advanced display" +msgstr "" + #: src/components/Exchange/SwapBox.js msgid "Long {0}" msgstr "Long {0}" @@ -1917,7 +1912,7 @@ msgid "Total Trading Volume" msgstr "Trading Volumen insgesamt" #: src/components/Exchange/ConfirmationBox.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/CollateralSpreadRow.tsx msgid "Collateral Spread" msgstr "" @@ -2001,10 +1996,6 @@ msgstr "" msgid "Allow {0} to be spent" msgstr "" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -msgid "You have an existing position with {0} as collateral. This action will not apply for that position." -msgstr "Du hast eine bestehende Position mit {0} als Kollateral. Diese Aktion gilt nicht für diese Position." - #: src/components/Exchange/SwapBox.js msgid "Swap Order created!" msgstr "Swap Order erstellt!" @@ -2053,7 +2044,7 @@ msgstr "" msgid "{existingTriggerOrderLength, plural, one {You have an active trigger order that could impact this position.} other {You have # active trigger orders that could impact this position.}}" msgstr "{existingTriggerOrderLength, plural, one {Du hast einen aktiven Triggerauftrag, der sich auf diese Position auswirken könnte.} other {Du hast # aktive Triggeraufträge, die sich auf diese Position auswirken könnten.}}" -#: src/components/SubaccountNavigationButton/SubaccountNavigationButton.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/OneClickTrading.tsx msgid "Reduce wallet signing popups with One-Click Trading. This option is also available through the Wallet menu in the top right. <0>Read more." msgstr "Reduziere die Anzahl der Wallet-Popups mit One-Click Trading. Diese Option ist auch über das Wallet-Menü oben rechts verfügbar. <0>Mehr lesen." @@ -2069,7 +2060,6 @@ msgstr "" msgid "Swap {0} USDG for{1} {2}" msgstr "" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/OrderItem/OrderItem.tsx msgid "{0} will be swapped to {1} on order execution." msgstr "" @@ -2127,8 +2117,6 @@ msgstr "" #: src/components/Exchange/ConfirmationBox.js #: src/components/Exchange/SwapBox.js #: src/components/Exchange/SwapBox.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/SwapCard/SwapCard.tsx #: src/components/Synthetics/SwapCard/SwapCard.tsx msgid "{0} Price" @@ -2237,6 +2225,10 @@ msgstr "Preis unter Mark Preis" msgid "APRs are updated weekly on Wednesday and will depend on the fees collected for the week." msgstr "APRs werden wöchentlich am Mittwoch aktualisiert und hängen von den in der Woche erhobenen Gebühren ab." +#: src/components/Synthetics/TradeBox/TradeBoxRows/AdvancedDisplayRows.tsx +msgid "Advanced Display" +msgstr "" + #: src/components/Synthetics/SubaccountModal/utils.ts msgid "Generate & Activate Subaccount" msgstr "" @@ -2294,7 +2286,6 @@ msgid "Couldn't find a swap route with enough liquidity" msgstr "" #: src/components/Exchange/ConfirmationBox.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx msgid "Confirm Long" msgstr "Bestätige Long" @@ -2345,6 +2336,10 @@ msgstr "Verfügbarer Auszahlungsbetrag aus GLP. Mittel, die nicht durch aktuelle msgid "Invalid price, see warning" msgstr "Ungültiger Preis, siehe Warnung" +#: src/components/Synthetics/TradeBox/hooks/useCollateralInTooltipContent.tsx +msgid "You will be short {indexSymbol} only from your short position." +msgstr "" + #: src/pages/Actions/ActionsV1/ActionsV1.tsx msgid "GMX V1 {networkName} actions for all accounts." msgstr "" @@ -2361,6 +2356,10 @@ msgstr "" msgid "You need to select {swapTokenSymbol} as the \"Pay\" token to use it for collateral to initiate this trade." msgstr "Du musst {swapTokenSymbol} als \"Bezahlen\"-Token auswählen, um es als Kollateral für die Einleitung dieses Trades zu verwenden." +#: src/components/Synthetics/TradeBox/TradeBoxRows/LimitAndTPSLRows.tsx +msgid "There are issues in the TP/SL orders." +msgstr "" + #: src/components/Glp/GlpSwap.js msgid "The Bonus Rebate is an estimate and will be airdropped as ARB tokens when migrating this liquidity to GM pools within the same epoch. <0>Read more." msgstr "" @@ -2398,9 +2397,12 @@ msgstr "Aktueller Pool-Betrag" msgid "Cancel failed." msgstr "Abbruch fehlgeschlagen." +#: src/components/Synthetics/TradeBox/TradeBoxRows/AvailableLiquidityRow.tsx +msgid "The order will be executed if there is sufficient liquidity and the execution price guarantees that you will receive the minimum receive amount." +msgstr "" + #: src/components/Exchange/ConfirmationBox.js #: src/components/Exchange/PositionSeller.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx msgid "Transacting with a depegged stable coin is subject to spreads reflecting the worse of current market price or $1.00, with transactions involving multiple stablecoins may have multiple spreads." msgstr "" @@ -2445,10 +2447,6 @@ msgstr "Markt wählen" msgid "Open positions: {0}<0/>Under risk: {1}" msgstr "Offene Positionen: {0}<0/>Unter Risiko: {1}" -#: src/components/SubaccountNavigationButton/SubaccountNavigationButton.tsx -msgid "There are insufficient funds in your Subaccount for One-Click Trading. Click here to top-up." -msgstr "" - #: src/components/Exchange/UsefulLinks.tsx msgid "Speed up page loading" msgstr "Beschleunige das Laden von Seiten" @@ -2517,10 +2515,6 @@ msgstr "Handeln" msgid "Adding referral code failed." msgstr "Hinzufügen des Empfehlungscodes fehlgeschlagen." -#: src/components/SubaccountNavigationButton/SubaccountNavigationButton.tsx -msgid "The previously authorized maximum number of Actions has been reached for One-Click Trading. Click here to re-authorize." -msgstr "" - #: src/components/Exchange/PositionEditor.js msgid "Max leverage without PnL: {0}x" msgstr "" @@ -2680,13 +2674,12 @@ msgstr "" #: src/components/Exchange/PositionSeller.js #: src/components/Exchange/SwapBox.js #: src/components/Exchange/SwapBox.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/OrderEditor/OrderEditor.tsx -#: src/components/Synthetics/PositionEditor/PositionEditor.tsx -#: src/components/Synthetics/PositionSeller/PositionSeller.tsx -#: src/components/Synthetics/TradeBox/TradeBox.tsx -#: src/components/Synthetics/TradeBox/TradeBox.tsx +#: src/components/Synthetics/PositionEditor/PositionEditorAdvancedRows.tsx +#: src/components/Synthetics/PositionSeller/PositionSellerAdvancedDisplayRows.tsx #: src/components/Synthetics/TradeBox/TradeBox.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/AdvancedDisplayRows.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/AdvancedDisplayRows.tsx msgid "Leverage" msgstr "Hebelwirkung" @@ -2791,10 +2784,6 @@ msgstr "" msgid "Claim failed." msgstr "Anspruch gescheitert." -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -msgid "You have selected {collateralTokenSymbol} as collateral; the liquidation price is higher compared to using a stablecoin as collateral since the worth of the collateral will change with its price. If required and available, you can change the collateral type using the \"Collateral In\" option in the trade box." -msgstr "" - #: src/components/Synthetics/Claims/SettleAccruedCard.tsx msgid "Accrued Price Impact Rebates. They will become Claimable after some time.<0/><1/><2>Read more." msgstr "" @@ -2861,10 +2850,6 @@ msgstr "" msgid "GM can be sold for {0} and {1} for this market up to the specified selling caps. The remaining tokens in the pool are reserved for currently open positions." msgstr "" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -msgid "Collateral value may differ due to different Price Impact at the time of execution." -msgstr "" - #: src/components/Synthetics/ExecutionPriceRow.tsx #: src/components/Synthetics/TradeHistory/TradeHistoryRow/utils/position.ts #: src/components/Synthetics/TradeHistory/TradeHistoryRow/utils/position.ts @@ -2967,6 +2952,10 @@ msgstr "Vesting mit GMX auf Arbitrum" msgid "{longOrShort} positions {fundingAction} a funding fee of {fundingRate} per hour and {borrowAction} a borrow fee of {borrowRate} per hour." msgstr "" +#: src/components/Synthetics/TradeBox/TradeBoxRows/LimitAndTPSLRows.tsx +msgid "Limit / TP / SL" +msgstr "" + #: src/components/Exchange/OrderEditor.js #: src/components/Synthetics/OrderEditor/OrderEditor.tsx msgid "Updating Order..." @@ -3029,8 +3018,8 @@ msgstr "Noch keine Trades" #: src/components/Exchange/ConfirmationBox.js #: src/components/Exchange/PositionSeller.js #: src/components/SettingsModal/SettingsModal.tsx -#: src/components/Synthetics/ConfirmationBox/rows/AllowedSlippageRow.tsx #: src/components/Synthetics/PositionSeller/rows/AllowedSlippageRow.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/AllowedSlippageRow.tsx msgid "Allowed Slippage" msgstr "Erlaubter Slippage" @@ -3147,12 +3136,11 @@ msgstr "Swap übermittelt." #: src/components/Exchange/PositionSeller.js #: src/components/Exchange/PositionsList.js #: src/components/Exchange/TradeHistory.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/PositionItem/PositionItem.tsx #: src/components/Synthetics/PositionItem/PositionItem.tsx -#: src/components/Synthetics/PositionSeller/PositionSeller.tsx -#: src/components/Synthetics/PositionSeller/PositionSeller.tsx -#: src/components/Synthetics/TradeBox/TradeBox.tsx +#: src/components/Synthetics/PositionSeller/PositionSellerAdvancedDisplayRows.tsx +#: src/components/Synthetics/PositionSeller/PositionSellerAdvancedDisplayRows.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/AdvancedDisplayRows.tsx #: src/components/Synthetics/TradeHistory/TradeHistoryRow/utils/position.ts #: src/pages/AccountDashboard/DailyAndCumulativePnL.tsx #: src/pages/Actions/ActionsV1/ActionsV1.tsx @@ -3176,6 +3164,7 @@ msgstr "" #: src/components/Exchange/PositionEditor.js #: src/components/Exchange/PositionEditor.js #: src/components/Synthetics/PositionEditor/PositionEditor.tsx +#: src/components/Synthetics/PositionEditor/types.ts #: src/components/Synthetics/SubaccountModal/SubaccountModal.tsx #: src/components/Synthetics/TradeHistory/keys.ts #: src/pages/Stake/StakeV2.tsx @@ -3261,8 +3250,8 @@ msgstr "Die Position wird zu {0} USD mit einer maximalen Slippage von {1}% eröf msgid "Active Referral Code" msgstr "Aktive Referral Codes" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/PositionEditor/PositionEditor.tsx +#: src/components/Synthetics/TradeBox/hooks/useTradeWarningsRows.tsx msgid "Pending {0} approval" msgstr "" @@ -3274,6 +3263,10 @@ msgstr "Bitte wechsle dein Netzwerk zu Arbitrum." msgid "The position would be immediately liquidated upon order execution. Try reducing the size." msgstr "" +#: src/components/Synthetics/TradeBox/TradeBoxRows/OneClickTrading.tsx +msgid "Enable" +msgstr "" + #: src/components/Synthetics/GmList/GmList.tsx #: src/components/Synthetics/MarketTokenSelector/MarketTokenSelector.tsx msgid "BUYABLE" @@ -3305,6 +3298,10 @@ msgstr "" msgid "You have yet to reach the minimum \"Capital Used\" of {0} to qualify for the rankings." msgstr "" +#: src/components/Synthetics/TradeBox/TradeBoxRows/LimitPriceRow.tsx +msgid "The execution price for the limit order updates in real-time on the orders tab after order creation to guarantee that you receive the minimum receive amount." +msgstr "" + #: src/components/Exchange/SwapBox.js msgid "Swap amount exceeds Available Liquidity." msgstr "" @@ -3326,8 +3323,8 @@ msgstr "Prev" msgid "Unknown buy GM order" msgstr "" -#: src/components/Synthetics/ConfirmationBox/rows/AllowedSlippageRow.tsx #: src/components/Synthetics/PositionSeller/rows/AllowedSlippageRow.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/AllowedSlippageRow.tsx msgid "You can edit the default Allowed Slippage in the settings menu on the top right of the page.<0/><1/>Note that a low allowed slippage, e.g. less than -{0}, may result in failed orders if prices are volatile." msgstr "" @@ -3363,7 +3360,7 @@ msgstr "Verdienen" #: src/components/Exchange/SwapBox.js #: src/components/Synthetics/CollateralSelector/CollateralSelector.tsx #: src/components/Synthetics/CollateralSelector/CollateralSelector.tsx -#: src/components/Synthetics/TradeBox/CollateralSelectorRow.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/CollateralSelectorRow.tsx msgid "Collateral In" msgstr "Kollateral in" @@ -3383,8 +3380,8 @@ msgstr "Handelsleitfaden" msgid "TRADING Airdrop" msgstr "" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -msgid "Limit Order Price to guarantee Min. Receive amount is updated in real time in the Orders tab after the order has been created." +#: src/components/Synthetics/TradeBox/hooks/useCollateralInTooltipContent.tsx +msgid "You will be short {indexSymbol} from your short position, while being long {collateralSymbol} from your {collateralSymbol} collateral. This can be useful for delta-neutral strategies to earn funding fees." msgstr "" #: src/components/Referrals/TradersStats.tsx @@ -3445,8 +3442,8 @@ msgstr "" msgid "The Execution Price didn't meet the Acceptable Price condition. The Order will get filled when the condition is met." msgstr "Der Ausführungspreis erfüllt die akzeptable Preisbedingung nicht. Der Auftrag wird ausgeführt, wenn die Bedingung erfüllt ist." -#: src/components/Synthetics/PositionEditor/PositionEditor.tsx -#: src/components/Synthetics/PositionSeller/PositionSeller.tsx +#: src/components/Synthetics/PositionEditor/PositionEditorAdvancedRows.tsx +#: src/components/Synthetics/PositionSeller/PositionSellerAdvancedDisplayRows.tsx msgid "Initial Collateral (Collateral excluding Borrow and Funding Fee)." msgstr "" @@ -3466,15 +3463,15 @@ msgstr "Strukturierte Produkte" #: src/components/AprInfo/AprInfo.tsx #: src/components/AprInfo/AprInfo.tsx #: src/components/Synthetics/AcceptablePriceImpactInputRow/AcceptablePriceImpactInputRow.tsx -#: src/components/Synthetics/PositionSeller/PositionSeller.tsx -#: src/components/Synthetics/TradeBox/TradeBox.tsx +#: src/components/Synthetics/PositionSeller/PositionSellerAdvancedDisplayRows.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/AdvancedDisplayRows.tsx #: src/pages/LeaderboardPage/components/LeaderboardAccountsTable.tsx #: src/pages/LeaderboardPage/components/LeaderboardPositionsTable.tsx #: src/pages/LeaderboardPage/components/LeaderboardPositionsTable.tsx msgid "NA" msgstr "" -#: src/components/Synthetics/TradeBox/CollateralSelectorRow.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/CollateralSelectorRow.tsx msgid "You have an existing position with {0} as collateral. This action will not apply for that position. <0>Switch to {1} collateral." msgstr "" @@ -3511,10 +3508,6 @@ msgstr "Trigger-Preis für den Auftrag." #: src/components/Synthetics/Claims/ClaimHistoryRow/ClaimFundingFeesHistoryRow.tsx #: src/components/Synthetics/Claims/ClaimHistoryRow/ClaimFundingFeesHistoryRow.tsx #: src/components/Synthetics/Claims/ClaimsHistory.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/MarketCard/MarketCard.tsx #: src/components/Synthetics/MarketNetFee/MarketNetFee.tsx #: src/components/Synthetics/PositionEditor/PositionEditor.tsx @@ -3587,8 +3580,6 @@ msgstr "" #: src/components/Exchange/PositionsList.js #: src/components/Exchange/PositionsList.js #: src/components/Exchange/SwapBox.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/OrderEditor/OrderEditor.tsx #: src/components/Synthetics/PositionEditor/PositionEditor.tsx #: src/components/Synthetics/PositionItem/PositionItem.tsx @@ -3659,10 +3650,6 @@ msgstr "Handle auf GMX und gewinne <0>$250.000 in Preisen! Live bis zum 30. msgid "You are leaving GMX.io and will be redirected to a third party, independent website." msgstr "Du verlässt GMX.io und wirst auf eine unabhängige Website eines Drittanbieters weitergeleitet." -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -msgid "You have selected {collateralTokenSymbol} as collateral to short {indexTokenSymbol}." -msgstr "" - #: src/components/Synthetics/PositionItem/PositionItem.tsx #: src/components/Synthetics/PositionItem/PositionItem.tsx msgid "Accrued Borrow Fee" @@ -3698,10 +3685,10 @@ msgstr "" msgid "<0>Notifications are provided by Notifi and not affiliated with GMX. By subscribing, you agree that info you provide to Notifi will be governed by its <1>Privacy Policy<2> and <3>Terms of Use." msgstr "" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/GmSwap/GmConfirmationBox/GmConfirmationBox.tsx #: src/components/Synthetics/PositionEditor/PositionEditor.tsx #: src/components/Synthetics/PositionSeller/PositionSeller.tsx +#: src/components/Synthetics/TradeBox/hooks/useTradeWarningsRows.tsx msgid "High Network Fee not yet acknowledged" msgstr "" @@ -3742,11 +3729,6 @@ msgstr "" msgid "UI Fee" msgstr "" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -msgid "Confirm {0} Order" -msgstr "" - #: src/domain/synthetics/orders/simulateExecuteOrderTxn.tsx #: src/domain/synthetics/orders/simulateExecuteOrderTxn.tsx msgid "Execute order simulation failed." @@ -3791,9 +3773,10 @@ msgstr "Dokumente" #: src/components/Exchange/ConfirmationBox.js #: src/components/Exchange/PositionSeller.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/PositionEditor/PositionEditor.tsx #: src/components/Synthetics/PositionSeller/PositionSeller.tsx +#: src/components/Synthetics/TradeBox/hooks/useTradeButtonState.tsx +#: src/components/Synthetics/TradeBox/TradeBox.tsx msgid "Creating Order..." msgstr "Erstellen der Order..." @@ -4058,7 +4041,6 @@ msgstr "Verringert" #: src/components/Exchange/OrdersList.js #: src/components/Exchange/TradeHistory.js #: src/components/Exchange/TradeHistory.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/domain/synthetics/orders/utils.tsx #: src/pages/OrdersOverview/OrdersOverview.js msgid "Decrease" @@ -4093,11 +4075,15 @@ msgstr "Dezentr." msgid "GMX Weekly Updates" msgstr "GMX Wöchentliche Updates" +#: src/components/Synthetics/TradeBox/hooks/useCollateralInTooltipContent.tsx +msgid "You will be long {indexSymbol} only from your long position." +msgstr "" + #: src/pages/OrdersOverview/OrdersOverview.js msgid "Total active: {openTotal}, executed: {executedTotal}, cancelled: {cancelledTotal}" msgstr "Insgesamt aktiv: {openTotal}, ausgeführt: {executedTotal}, cancelled: {cancelledTotal}" -#: src/components/Synthetics/TradeBox/CollateralSelectorRow.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/CollateralSelectorRow.tsx msgid "You have an existing order with {symbol} as collateral. <0>Switch to {symbol} collateral." msgstr "" @@ -4132,7 +4118,7 @@ msgstr "" msgid "Yield simulator for GMX" msgstr "Yield Simulator für GMX" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/AvailableLiquidityRow.tsx msgid "There may not be sufficient liquidity to execute your order when the Min. Receive are met." msgstr "" @@ -4178,9 +4164,9 @@ msgstr "" #: src/components/Exchange/SwapBox.js #: src/components/Exchange/SwapBox.js #: src/components/Exchange/SwapBox.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/MarketCard/MarketCard.tsx #: src/components/Synthetics/SwapCard/SwapCard.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/AvailableLiquidityRow.tsx msgid "Available Liquidity" msgstr "Verfügbare Liquidität" @@ -4269,12 +4255,9 @@ msgstr "" #: src/components/Exchange/ConfirmationBox.js #: src/components/Exchange/PositionEditor.js #: src/components/Exchange/PositionSeller.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/PositionEditor/PositionEditor.tsx -#: src/components/Synthetics/PositionSeller/PositionSeller.tsx -#: src/components/Synthetics/TradeBox/TradeBox.tsx +#: src/components/Synthetics/PositionEditor/PositionEditorAdvancedRows.tsx +#: src/components/Synthetics/PositionSeller/PositionSellerAdvancedDisplayRows.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/AdvancedDisplayRows.tsx msgid "Collateral ({0})" msgstr "Kollateral ({0})" @@ -4286,6 +4269,14 @@ msgstr "" msgid "Order updated!" msgstr "Orderupdate übermittelt!" +#: src/components/Synthetics/TradeBox/hooks/useCollateralInTooltipContent.tsx +msgid "You will be short {indexSymbol} from your short position, while being long {collateralSymbol} from your {collateralSymbol} collateral. The liquidation price will vary based on the price of {collateralSymbol}." +msgstr "" + +#: src/components/Synthetics/TradeBox/TradeBoxRows/OneClickTrading.tsx +msgid "The previously authorized maximum number of actions has been reached for One-Click Trading." +msgstr "" + #: src/components/Synthetics/CollateralSelector/CollateralSelector.tsx #: src/components/Synthetics/CollateralSelector/CollateralSelector.tsx msgid "Select a pool containing {0} to use it as collateral." @@ -4324,7 +4315,6 @@ msgid "Max Leverage without PnL: 100x" msgstr "" #: src/components/Exchange/ConfirmationBox.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx msgid "Confirm Short" msgstr "Bestätige Short" @@ -4340,10 +4330,6 @@ msgstr "" msgid "Order Type" msgstr "" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -msgid "Decrease size" -msgstr "" - #: src/components/Synthetics/StatusNotification/GmStatusNotification.tsx msgid "Sell order executed" msgstr "" @@ -4360,13 +4346,9 @@ msgstr "" msgid "Affiliate Rewards Claimed" msgstr "" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -msgid "Old Collateral" -msgstr "" - #: src/components/Exchange/ConfirmationBox.js #: src/components/Exchange/PositionSeller.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/SwapSpreadRow.tsx msgid "Spread" msgstr "Spread" @@ -4402,6 +4384,10 @@ msgstr "Lädt..." msgid "Leaderboard for GMX traders" msgstr "Rangliste für GMX-Trader" +#: src/components/Synthetics/TradeBox/TradeBoxRows/OneClickTrading.tsx +msgid "There are insufficient funds in your subaccount for One-Click Trading" +msgstr "" + #: src/components/Exchange/PositionsList.js msgid "Share" msgstr "Teilen" @@ -4546,7 +4532,7 @@ msgstr "" msgid "GLP autocompounding vaults" msgstr "" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx +#: src/components/Synthetics/TradeBox/hooks/useTradeButtonState.tsx msgid "TP/SL orders exceed the position" msgstr "" @@ -4575,7 +4561,7 @@ msgstr "Wenn du die Position schließt, kannst du auswählen, in welchem Token d msgid "Top PnL (%)" msgstr "" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/AvailableLiquidityRow.tsx #: src/domain/synthetics/orders/utils.tsx msgid "There may not be sufficient liquidity to execute your order when the price conditions are met." msgstr "" @@ -4774,7 +4760,7 @@ msgstr "" msgid "Begin Transfer" msgstr "Übertragung beginnen" -#: src/components/SubaccountNavigationButton/SubaccountNavigationButton.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/OneClickTrading.tsx msgid "One-Click Trading is not available for wrapping or unwrapping native token {0}." msgstr "" @@ -4823,7 +4809,7 @@ msgstr "Governance" msgid "Cancel" msgstr "Abbruch" -#: src/components/Synthetics/ConfirmationBox/SideOrderEntries.tsx +#: src/components/Synthetics/TradeBox/components/SideOrderEntries.tsx msgid "Remove Row" msgstr "" @@ -4849,10 +4835,6 @@ msgstr "Order storniert." msgid "Buy or Transfer AVAX to Avalanche" msgstr "" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -msgid "You have selected {collateralTokenSymbol} as Collateral, the Liquidation Price will vary based on the price of {collateralTokenSymbol}." -msgstr "" - #: src/pages/Ecosystem/Ecosystem.js msgid "Telegram bot for Open Interest on GMX" msgstr "Telegram-Bot für Open Interest auf GMX" @@ -4903,7 +4885,7 @@ msgstr "" msgid "Enter new amount or price" msgstr "" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/LimitAndTPSLRows.tsx msgid "Stop-Loss PnL" msgstr "" @@ -5034,7 +5016,7 @@ msgstr "Von den von dir empfohlenen Tradern gehandeltes Volumen." msgid "Stablecoin Percentage" msgstr "Prozentsatz von Stablecoins" -#: src/components/Synthetics/TradeBox/CollateralSelectorRow.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/CollateralSelectorRow.tsx msgid "You have an existing position with {0} as collateral. This Order will not be valid for that Position. <0>Switch to {1} collateral." msgstr "" @@ -5269,6 +5251,10 @@ msgstr "" msgid "Claim esGMX" msgstr "Beanspruche esGMX" +#: src/components/Synthetics/TradeBox/TradeBoxRows/OneClickTrading.tsx +msgid "Re-authorize" +msgstr "" + #: src/pages/BuyGMX/BuyGMX.tsx msgid "Buy or Transfer ETH to Arbitrum" msgstr "" @@ -5449,10 +5435,6 @@ msgstr "" msgid "Max Out" msgstr "" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -msgid "The order will only execute if the Min. Receive is met and there is sufficient liquidity." -msgstr "" - #: src/components/Exchange/PositionEditor.js #: src/components/Exchange/PositionSeller.js #: src/components/Exchange/PositionSeller.js @@ -5677,7 +5659,7 @@ msgstr "" msgid "{0} and {1} can be used to buy GM for this market up to the specified buying caps." msgstr "" -#: src/components/SubaccountNavigationButton/SubaccountNavigationButton.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/OneClickTrading.tsx msgid "One-Click Trading is not available using network's native token {0}. Consider using {1} instead." msgstr "" @@ -5755,8 +5737,7 @@ msgstr "" #: src/components/Exchange/ConfirmationBox.js #: src/components/Exchange/ConfirmationBox.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/LimitPriceRow.tsx msgid "Limit Price" msgstr "Limit Preis" @@ -5780,6 +5761,7 @@ msgstr "Einzahlung in {0} {longOrShortText} konnte nicht ausgeführt werden" #: src/components/Exchange/PositionEditor.js #: src/components/Exchange/PositionEditor.js #: src/components/Synthetics/PositionEditor/PositionEditor.tsx +#: src/components/Synthetics/PositionEditor/types.ts #: src/components/Synthetics/TradeHistory/keys.ts #: src/pages/Stake/StakeV2.tsx #: src/pages/Stake/StakeV2.tsx @@ -5815,10 +5797,6 @@ msgstr "Aktivierung der Hebelwirkung..." msgid "There may not be sufficient liquidity to execute the swap to the receive token when the price conditions are met." msgstr "" -#: src/components/SubaccountNavigationButton/SubaccountNavigationButton.tsx -msgid "Enable One-Click Trading" -msgstr "" - #: src/components/NotifyModal/NotifyModal.tsx msgid "Trade Errors" msgstr "" @@ -5842,8 +5820,6 @@ msgstr "" #: src/components/Exchange/SwapBox.js #: src/components/Glp/GlpSwap.js #: src/components/Glp/GlpSwap.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/GmSwap/GmConfirmationBox/GmConfirmationBox.tsx #: src/components/Synthetics/GmSwap/GmConfirmationBox/GmConfirmationBox.tsx #: src/components/Synthetics/GmSwap/GmSwapBox/GmSwapBox.tsx @@ -5911,9 +5887,9 @@ msgstr "" msgid "There are insufficient funds in your Subaccount for One-Click Trading. <0>Click here to top-up." msgstr "" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx +#: src/components/Synthetics/TradeBox/hooks/useTradeboxTransactions.tsx +#: src/components/Synthetics/TradeBox/hooks/useTradeboxTransactions.tsx +#: src/components/Synthetics/TradeBox/hooks/useTradeboxTransactions.tsx msgid "Error submitting order" msgstr "" @@ -6009,10 +5985,6 @@ msgstr "" msgid "Rebates" msgstr "" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -msgid "The spread is > 1%, please ensure the trade details are acceptable before comfirming" -msgstr "" - #: src/components/Glp/GlpSwap.js msgid "Sell failed." msgstr "Verkauf fehlgeschlagen." @@ -6046,7 +6018,7 @@ msgstr "" msgid "Date" msgstr "Datum" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx +#: src/components/Synthetics/TradeBox/hooks/useTradeWarningsRows.tsx #: src/domain/synthetics/trade/utils/validation.ts #: src/domain/synthetics/trade/utils/validation.ts #: src/domain/synthetics/trade/utils/validation.ts @@ -6086,7 +6058,6 @@ msgid "Price above Mark Price" msgstr "" #: src/components/Exchange/PositionSeller.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/OrderItem/OrderItem.tsx #: src/components/Synthetics/OrderList/OrderList.tsx #: src/components/Synthetics/PositionSeller/PositionSeller.tsx @@ -6167,7 +6138,7 @@ msgstr "" msgid "The amount left in the subaccount is not enough to cover network gas costs." msgstr "" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/LimitAndTPSLRows.tsx msgid "Take-Profit PnL" msgstr "" @@ -6408,10 +6379,6 @@ msgstr "" #: src/components/Synthetics/Claims/ClaimHistoryRow/ClaimFundingFeesHistoryRow.tsx #: src/components/Synthetics/Claims/ClaimHistoryRow/ClaimFundingFeesHistoryRow.tsx #: src/components/Synthetics/Claims/ClaimsHistory.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/MarketCard/MarketCard.tsx #: src/components/Synthetics/MarketNetFee/MarketNetFee.tsx #: src/components/Synthetics/PositionEditor/PositionEditor.tsx @@ -6554,7 +6521,6 @@ msgid "Failed Settlement of Funding Fees" msgstr "" #: src/components/Exchange/ConfirmationBox.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx msgid "Pay Amount" msgstr "Betrag bezahlen" @@ -6624,7 +6590,7 @@ msgstr "" msgid "{ordersText} cancelled" msgstr "" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx +#: src/components/Synthetics/TradeBox/hooks/useTradeButtonState.tsx msgid "Limit price below Mark Price" msgstr "" @@ -6649,7 +6615,7 @@ msgid "Transaction was cancelled." msgstr "Transaktion wurde abgebrochen." #: src/components/Exchange/ConfirmationBox.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx +#: src/components/Synthetics/TradeBox/hooks/useTradeButtonState.tsx msgid "Accept confirmation of trigger orders" msgstr "Bestätigung von Trigger-Orders akzeptieren" @@ -6920,10 +6886,6 @@ msgstr "Du hast eine ausstehende Überweisung von {sender}." msgid "Enter a trigger price" msgstr "" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -msgid "Limit Order Price will vary based on Fees and Price Impact to guarantee the Min. Receive amount." -msgstr "" - #: src/pages/BeginAccountTransfer/BeginAccountTransfer.tsx msgid "Vested GLP not withdrawn" msgstr "Gevestete GLP nicht abgehoben" @@ -6935,11 +6897,9 @@ msgstr "Gevestete GLP nicht abgehoben" #: src/components/Exchange/PositionsList.js #: src/components/Exchange/SwapBox.js #: src/components/Exchange/SwapBox.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/PositionEditor/PositionEditor.tsx #: src/components/Synthetics/PositionItem/PositionItem.tsx #: src/components/Synthetics/PositionList/PositionList.tsx -#: src/components/Synthetics/TradeBox/TradeBox.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/EntryPriceRow.tsx #: src/pages/LeaderboardPage/components/LeaderboardPositionsTable.tsx msgid "Entry Price" msgstr "Einstiegspreis" @@ -6962,6 +6922,7 @@ msgstr "" #: src/components/AddressDropdown/AddressDropdown.tsx #: src/components/Synthetics/SubaccountModal/SubaccountModal.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/OneClickTrading.tsx msgid "One-Click Trading" msgstr "" @@ -7025,11 +6986,10 @@ msgid "SELL…" msgstr "" #: src/components/Exchange/ConfirmationBox.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx msgid "Confirm Swap" msgstr "Bestätige Swap" -#: src/components/Synthetics/PositionSeller/PositionSeller.tsx +#: src/components/Synthetics/PositionSeller/PositionSellerAdvancedDisplayRows.tsx msgid "Keep leverage is not available as Position exceeds max. allowed leverage. <0>Read more." msgstr "" @@ -7093,6 +7053,10 @@ msgstr "" msgid "<0>The APY is an estimate based on the fees collected for the past seven days, extrapolating the current borrowing fee. It excludes:<1><2>price changes of the underlying token(s)<3>traders' PnL, which is expected to be neutral in the long term<4>funding fees, which are exchanged between traders<5><6>Read more about GM token pricing.<7>Check GM pools' performance against other LP Positions in the <8>GMX Dune Dashboard." msgstr "" +#: src/components/Synthetics/TradeBox/TradeBoxRows/OneClickTrading.tsx +msgid "Top-Up" +msgstr "" + #: src/components/Synthetics/MarketCard/MarketCard.tsx msgid "Ask Price (Exit)" msgstr "" @@ -7105,6 +7069,10 @@ msgstr "" msgid "Orders ({ordersCount})" msgstr "" +#: src/components/Synthetics/TradeBox/hooks/useCollateralInTooltipContent.tsx +msgid "You will be long {indexSymbol} from your long position, as well as from your {collateralSymbol} collateral. The liquidation price is higher compared to using a stablecoin as collateral since the worth of the collateral will change with its price." +msgstr "" + #: src/pages/Ecosystem/Ecosystem.js msgid "GMX explorer for stats and traders" msgstr "GMX-Explorer für Statistiken und Trader" @@ -7150,7 +7118,7 @@ msgstr "" msgid "Fee values do not include incentives." msgstr "" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx +#: src/components/Synthetics/TradeBox/hooks/useTradeButtonState.tsx msgid "Limit price above Mark Price" msgstr "" @@ -7166,7 +7134,6 @@ msgstr "" #: src/components/Exchange/SwapBox.js #: src/components/Exchange/SwapBox.js #: src/components/Exchange/SwapBox.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/OrderList/filters/OrderTypeFilter.tsx #: src/components/Synthetics/StatusNotification/OrderStatusNotification.tsx #: src/components/Synthetics/SwapCard/SwapCard.tsx @@ -7328,10 +7295,8 @@ msgstr "" #: src/components/Exchange/PositionSeller.js #: src/components/Exchange/PositionsList.js #: src/components/Exchange/PositionsList.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/OrderItem/OrderItem.tsx #: src/components/Synthetics/OrderList/OrderList.tsx -#: src/components/Synthetics/PositionEditor/PositionEditor.tsx #: src/components/Synthetics/PositionItem/PositionItem.tsx #: src/components/Synthetics/PositionList/PositionList.tsx #: src/components/Synthetics/TradeHistory/useDownloadAsCsv.tsx @@ -7438,7 +7403,7 @@ msgid "short" msgstr "" #: src/components/Exchange/ConfirmationBox.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx +#: src/components/Synthetics/TradeBox/hooks/useTriggerOrdersConsent.tsx msgid "I am aware of the trigger orders" msgstr "Ich bin mir der Trigger-Orders bewusst" @@ -7483,12 +7448,12 @@ msgstr "Orderausführungspreis" #: src/components/Exchange/ConfirmationBox.js #: src/components/Exchange/PositionSeller.js -#: src/components/Synthetics/ConfirmationBox/rows/AllowedSlippageRow.tsx #: src/components/Synthetics/PositionSeller/rows/AllowedSlippageRow.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/AllowedSlippageRow.tsx msgid "Slippage is too high" msgstr "" -#: src/components/Synthetics/ConfirmationBox/SideOrderEntries.tsx +#: src/components/Synthetics/TradeBox/components/SideOrderEntries.tsx msgid "Add Row" msgstr "" @@ -7543,12 +7508,12 @@ msgstr "" #: src/components/Exchange/OrdersList.js #: src/components/Exchange/OrdersList.js #: src/components/Exchange/SwapBox.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/OrderEditor/OrderEditor.tsx #: src/components/Synthetics/OrderItem/OrderItem.tsx #: src/components/Synthetics/OrderList/filters/OrderTypeFilter.tsx #: src/components/Synthetics/PositionItem/PositionItem.tsx #: src/components/Synthetics/TradeBox/TradeBox.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/LimitAndTPSLRows.tsx #: src/components/Synthetics/TradeHistory/keys.ts msgid "Limit" msgstr "Limit" @@ -7571,7 +7536,6 @@ msgid "<0>Insufficient liquidity to execute the order<1>The mark price which msgstr "<0>Unzureichende Liquidität für die Ausführung des Auftrags<1>Der Markpreis, der ein Aggregat der Börsenkurse ist, hat den angegebenen Preis nicht erreicht<2>Der angegebene Preis wurde erreicht, aber nicht lange genug, um ihn auszuführen<3>Kein Keeper hat den Auftrag zur Ausführung angenommen" #: src/components/Exchange/ConfirmationBox.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx msgid "Your position's collateral after deducting fees:" msgstr "Das Kollateral deiner Position nach Abzug der Gebühren:" @@ -7621,8 +7585,8 @@ msgstr "" msgid "01 Sep 2021" msgstr "06 Sep 2021" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/OrderList/filters/OrderTypeFilter.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/LimitAndTPSLRows.tsx #: src/domain/synthetics/positions/utils.ts msgid "Take-Profit" msgstr "" diff --git a/src/locales/en/messages.po b/src/locales/en/messages.po index 4faee1f0de..696c5235dc 100644 --- a/src/locales/en/messages.po +++ b/src/locales/en/messages.po @@ -79,7 +79,6 @@ msgid "Subaccount generation failed" msgstr "Subaccount generation failed" #: src/components/Exchange/ConfirmationBox.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx msgid "{existingTriggerOrderLength, plural, one {You have an active trigger order that might execute immediately after you open this position. Please cancel the order or accept the confirmation to continue.} other {You have # active trigger orders that might execute immediately after you open this position. Please cancel the orders or accept the confirmation to continue.}}" msgstr "{existingTriggerOrderLength, plural, one {You have an active trigger order that might execute immediately after you open this position. Please cancel the order or accept the confirmation to continue.} other {You have # active trigger orders that might execute immediately after you open this position. Please cancel the orders or accept the confirmation to continue.}}" @@ -155,6 +154,10 @@ msgstr "{0} is above its target weight.<0/><1/>Get lower fees to <2>swap tok msgid "Withdrawal error." msgstr "Withdrawal error." +#: src/components/Synthetics/TradeBox/TradeBox.tsx +msgid "The execution price will constantly vary based on fees and price impact to guarantee that you receive the minimum receive amount." +msgstr "The execution price will constantly vary based on fees and price impact to guarantee that you receive the minimum receive amount." + #: src/pages/Home/Home.js msgid "Decentralized<0/>Perpetual Exchange" msgstr "Decentralized<0/>Perpetual Exchange" @@ -236,7 +239,6 @@ msgstr "No incentives distribution history yet." #: src/components/Glp/GlpSwap.js #: src/components/Glp/GlpSwap.js #: src/components/Glp/GlpSwap.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/OrderEditor/OrderEditor.tsx #: src/components/Synthetics/TradeFeesRow/TradeFeesRow.tsx msgid "Fees" @@ -403,8 +405,6 @@ msgid "Insufficient liquidity in the {0} market pool. Select a different pool fo msgstr "Insufficient liquidity in the {0} market pool. Select a different pool for this market. Choosing a different pool would open a new position different from the existing one.<0><1>Switch to {1} market pool." #: src/components/Exchange/ConfirmationBox.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx msgid "Confirm Limit Order" msgstr "Confirm Limit Order" @@ -515,6 +515,7 @@ msgstr "Rebates on V2" msgid "Incentives are airdropped weekly." msgstr "Incentives are airdropped weekly." +#: src/components/Synthetics/AcceptablePriceImpactInputRow/AcceptablePriceImpactInputRow.tsx #: src/components/Synthetics/AcceptablePriceImpactInputRow/AcceptablePriceImpactInputRow.tsx msgid "Acceptable Price Impact" msgstr "Acceptable Price Impact" @@ -527,10 +528,6 @@ msgstr "Add to Metamask" msgid "Insufficient staked tokens" msgstr "Insufficient staked tokens" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -msgid "New Collateral" -msgstr "New Collateral" - #: src/lib/wallets/connecters/binanceW3W/binanceWallet.ts msgid "Tap [Create Wallet] to start using your Web3 Wallet." msgstr "Tap [Create Wallet] to start using your Web3 Wallet." @@ -721,8 +718,6 @@ msgstr "Liq. {0} {longOrShortText}" #: src/components/Exchange/SwapBox.js #: src/components/Glp/GlpSwap.js #: src/components/Glp/GlpSwap.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/GmSwap/GmConfirmationBox/GmConfirmationBox.tsx #: src/components/Synthetics/GmSwap/GmConfirmationBox/GmConfirmationBox.tsx #: src/components/Synthetics/GmSwap/GmSwapBox/GmSwapBox.tsx @@ -747,8 +742,8 @@ msgstr "GMX Governance Page" msgid "Decentralized Money Market" msgstr "Decentralized Money Market" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/OrderList/filters/OrderTypeFilter.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/LimitAndTPSLRows.tsx #: src/domain/synthetics/positions/utils.ts msgid "Stop-Loss" msgstr "Stop-Loss" @@ -774,10 +769,6 @@ msgstr "{0} GLP have been reserved for vesting." msgid "Buy with {0}" msgstr "Buy with {0}" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -msgid "You have an existing position with {0} as collateral. This Order will not be valid for that Position." -msgstr "You have an existing position with {0} as collateral. This Order will not be valid for that Position." - #: src/components/Referrals/JoinReferralCode.js msgid "Adding..." msgstr "Adding..." @@ -891,8 +882,8 @@ msgid "Unstake completed!" msgstr "Unstake completed!" #: src/components/Exchange/ConfirmationBox.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/OrderEditor/OrderEditor.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/MinReceiveRow.tsx msgid "Min. Receive" msgstr "Min. Receive" @@ -931,8 +922,6 @@ msgstr "Avalanche Max. APY: {0}" #: src/components/Exchange/OrdersList.js #: src/components/Exchange/PositionsList.js #: src/components/Exchange/PositionsList.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/MarketStats/MarketStats.tsx #: src/components/Synthetics/OrderItem/OrderItem.tsx #: src/components/Synthetics/PositionItem/PositionItem.tsx @@ -1191,8 +1180,7 @@ msgstr "Telegram bot for GMX position updates" msgid "account" msgstr "account" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/TradeBox/TradeBox.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/AdvancedDisplayRows.tsx msgid "Keep leverage at {0}" msgstr "Keep leverage at {0}" @@ -1299,6 +1287,10 @@ msgstr "Order executed" msgid "Select Positions" msgstr "Select Positions" +#: src/components/Synthetics/TradeBox/hooks/useCollateralInTooltipContent.tsx +msgid "You will be long {indexSymbol} from your long position, while being long {collateralSymbol} from your {collateralSymbol} collateral. The liquidation price will vary based on the price of {collateralSymbol}." +msgstr "You will be long {indexSymbol} from your long position, while being long {collateralSymbol} from your {collateralSymbol} collateral. The liquidation price will vary based on the price of {collateralSymbol}." + #: src/components/Referrals/AffiliatesStats.tsx #: src/components/Referrals/AffiliatesStats.tsx #: src/components/Referrals/TradersStats.tsx @@ -1552,7 +1544,7 @@ msgstr "Updating Subaccount" msgid "Mark" msgstr "Mark" -#: src/components/Synthetics/PositionSeller/PositionSeller.tsx +#: src/components/Synthetics/PositionSeller/PositionSellerAdvancedDisplayRows.tsx msgid "Keep leverage at {keepLeverageAtValue}" msgstr "Keep leverage at {keepLeverageAtValue}" @@ -1708,7 +1700,7 @@ msgstr "Checking code..." msgid "GM Pools" msgstr "GM Pools" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/AvailableLiquidityRow.tsx msgid "The order will only execute if the price conditions are met and there is sufficient liquidity." msgstr "The order will only execute if the price conditions are met and there is sufficient liquidity." @@ -1747,16 +1739,14 @@ msgstr "Buy GMX on {chainName}" #: src/components/Exchange/PositionsList.js #: src/components/Synthetics/Claims/ClaimsHistory.tsx #: src/components/Synthetics/Claims/ClaimsHistory.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/OrderEditor/OrderEditor.tsx #: src/components/Synthetics/OrderItem/OrderItem.tsx #: src/components/Synthetics/OrderList/OrderList.tsx -#: src/components/Synthetics/PositionEditor/PositionEditor.tsx +#: src/components/Synthetics/PositionEditor/PositionEditorAdvancedRows.tsx #: src/components/Synthetics/PositionItem/PositionItem.tsx #: src/components/Synthetics/PositionList/PositionList.tsx -#: src/components/Synthetics/PositionSeller/PositionSeller.tsx -#: src/components/Synthetics/TradeBox/TradeBox.tsx +#: src/components/Synthetics/PositionSeller/PositionSellerAdvancedDisplayRows.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/AdvancedDisplayRows.tsx #: src/components/Synthetics/TradeHistory/TradeHistory.tsx #: src/components/Synthetics/TradeHistory/useDownloadAsCsv.tsx #: src/pages/LeaderboardPage/components/LeaderboardPositionsTable.tsx @@ -1894,6 +1884,11 @@ msgstr "You can get {0} better open fees and a {1} / 1h better net rate in the { msgid "{0} Approved!" msgstr "{0} Approved!" +#: src/components/Synthetics/PositionEditor/PositionEditorAdvancedRows.tsx +#: src/components/Synthetics/PositionSeller/PositionSellerAdvancedDisplayRows.tsx +msgid "Advanced display" +msgstr "Advanced display" + #: src/components/Exchange/SwapBox.js msgid "Long {0}" msgstr "Long {0}" @@ -1917,7 +1912,7 @@ msgid "Total Trading Volume" msgstr "Total Trading Volume" #: src/components/Exchange/ConfirmationBox.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/CollateralSpreadRow.tsx msgid "Collateral Spread" msgstr "Collateral Spread" @@ -2001,10 +1996,6 @@ msgstr "Initial top-up" msgid "Allow {0} to be spent" msgstr "Allow {0} to be spent" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -msgid "You have an existing position with {0} as collateral. This action will not apply for that position." -msgstr "You have an existing position with {0} as collateral. This action will not apply for that position." - #: src/components/Exchange/SwapBox.js msgid "Swap Order created!" msgstr "Swap Order created!" @@ -2053,7 +2044,7 @@ msgstr "{positionName} Fees settling" msgid "{existingTriggerOrderLength, plural, one {You have an active trigger order that could impact this position.} other {You have # active trigger orders that could impact this position.}}" msgstr "{existingTriggerOrderLength, plural, one {You have an active trigger order that could impact this position.} other {You have # active trigger orders that could impact this position.}}" -#: src/components/SubaccountNavigationButton/SubaccountNavigationButton.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/OneClickTrading.tsx msgid "Reduce wallet signing popups with One-Click Trading. This option is also available through the Wallet menu in the top right. <0>Read more." msgstr "Reduce wallet signing popups with One-Click Trading. This option is also available through the Wallet menu in the top right. <0>Read more." @@ -2069,7 +2060,6 @@ msgstr "You need a total of at least {0} {stakeTokenLabel} to vest {1} esGMX." msgid "Swap {0} USDG for{1} {2}" msgstr "Swap {0} USDG for{1} {2}" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/OrderItem/OrderItem.tsx msgid "{0} will be swapped to {1} on order execution." msgstr "{0} will be swapped to {1} on order execution." @@ -2127,8 +2117,6 @@ msgstr "Price below Limit Price." #: src/components/Exchange/ConfirmationBox.js #: src/components/Exchange/SwapBox.js #: src/components/Exchange/SwapBox.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/SwapCard/SwapCard.tsx #: src/components/Synthetics/SwapCard/SwapCard.tsx msgid "{0} Price" @@ -2237,6 +2225,10 @@ msgstr "Price below Mark Price" msgid "APRs are updated weekly on Wednesday and will depend on the fees collected for the week." msgstr "APRs are updated weekly on Wednesday and will depend on the fees collected for the week." +#: src/components/Synthetics/TradeBox/TradeBoxRows/AdvancedDisplayRows.tsx +msgid "Advanced Display" +msgstr "Advanced Display" + #: src/components/Synthetics/SubaccountModal/utils.ts msgid "Generate & Activate Subaccount" msgstr "Generate & Activate Subaccount" @@ -2294,7 +2286,6 @@ msgid "Couldn't find a swap route with enough liquidity" msgstr "Couldn't find a swap route with enough liquidity" #: src/components/Exchange/ConfirmationBox.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx msgid "Confirm Long" msgstr "Confirm Long" @@ -2345,6 +2336,10 @@ msgstr "Available amount to withdraw from GLP. Funds not utilized by current ope msgid "Invalid price, see warning" msgstr "Invalid price, see warning" +#: src/components/Synthetics/TradeBox/hooks/useCollateralInTooltipContent.tsx +msgid "You will be short {indexSymbol} only from your short position." +msgstr "You will be short {indexSymbol} only from your short position." + #: src/pages/Actions/ActionsV1/ActionsV1.tsx msgid "GMX V1 {networkName} actions for all accounts." msgstr "GMX V1 {networkName} actions for all accounts." @@ -2361,6 +2356,10 @@ msgstr "Requested decrease of {0} {longOrShortText} by {sizeDeltaUsd} USD." msgid "You need to select {swapTokenSymbol} as the \"Pay\" token to use it for collateral to initiate this trade." msgstr "You need to select {swapTokenSymbol} as the \"Pay\" token to use it for collateral to initiate this trade." +#: src/components/Synthetics/TradeBox/TradeBoxRows/LimitAndTPSLRows.tsx +msgid "There are issues in the TP/SL orders." +msgstr "There are issues in the TP/SL orders." + #: src/components/Glp/GlpSwap.js msgid "The Bonus Rebate is an estimate and will be airdropped as ARB tokens when migrating this liquidity to GM pools within the same epoch. <0>Read more." msgstr "The Bonus Rebate is an estimate and will be airdropped as ARB tokens when migrating this liquidity to GM pools within the same epoch. <0>Read more." @@ -2398,9 +2397,12 @@ msgstr "Current Pool Amount" msgid "Cancel failed." msgstr "Cancel failed." +#: src/components/Synthetics/TradeBox/TradeBoxRows/AvailableLiquidityRow.tsx +msgid "The order will be executed if there is sufficient liquidity and the execution price guarantees that you will receive the minimum receive amount." +msgstr "The order will be executed if there is sufficient liquidity and the execution price guarantees that you will receive the minimum receive amount." + #: src/components/Exchange/ConfirmationBox.js #: src/components/Exchange/PositionSeller.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx msgid "Transacting with a depegged stable coin is subject to spreads reflecting the worse of current market price or $1.00, with transactions involving multiple stablecoins may have multiple spreads." msgstr "Transacting with a depegged stable coin is subject to spreads reflecting the worse of current market price or $1.00, with transactions involving multiple stablecoins may have multiple spreads." @@ -2445,10 +2447,6 @@ msgstr "Select Market" msgid "Open positions: {0}<0/>Under risk: {1}" msgstr "Open positions: {0}<0/>Under risk: {1}" -#: src/components/SubaccountNavigationButton/SubaccountNavigationButton.tsx -msgid "There are insufficient funds in your Subaccount for One-Click Trading. Click here to top-up." -msgstr "There are insufficient funds in your Subaccount for One-Click Trading. Click here to top-up." - #: src/components/Exchange/UsefulLinks.tsx msgid "Speed up page loading" msgstr "Speed up page loading" @@ -2517,10 +2515,6 @@ msgstr "Trade" msgid "Adding referral code failed." msgstr "Adding referral code failed." -#: src/components/SubaccountNavigationButton/SubaccountNavigationButton.tsx -msgid "The previously authorized maximum number of Actions has been reached for One-Click Trading. Click here to re-authorize." -msgstr "The previously authorized maximum number of Actions has been reached for One-Click Trading. Click here to re-authorize." - #: src/components/Exchange/PositionEditor.js msgid "Max leverage without PnL: {0}x" msgstr "Max leverage without PnL: {0}x" @@ -2680,13 +2674,12 @@ msgstr "Expected execution price for the order, including the current price impa #: src/components/Exchange/PositionSeller.js #: src/components/Exchange/SwapBox.js #: src/components/Exchange/SwapBox.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/OrderEditor/OrderEditor.tsx -#: src/components/Synthetics/PositionEditor/PositionEditor.tsx -#: src/components/Synthetics/PositionSeller/PositionSeller.tsx -#: src/components/Synthetics/TradeBox/TradeBox.tsx -#: src/components/Synthetics/TradeBox/TradeBox.tsx +#: src/components/Synthetics/PositionEditor/PositionEditorAdvancedRows.tsx +#: src/components/Synthetics/PositionSeller/PositionSellerAdvancedDisplayRows.tsx #: src/components/Synthetics/TradeBox/TradeBox.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/AdvancedDisplayRows.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/AdvancedDisplayRows.tsx msgid "Leverage" msgstr "Leverage" @@ -2791,10 +2784,6 @@ msgstr "Insufficient liquidity in the {0} market pool. Select a different pool f msgid "Claim failed." msgstr "Claim failed." -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -msgid "You have selected {collateralTokenSymbol} as collateral; the liquidation price is higher compared to using a stablecoin as collateral since the worth of the collateral will change with its price. If required and available, you can change the collateral type using the \"Collateral In\" option in the trade box." -msgstr "You have selected {collateralTokenSymbol} as collateral; the liquidation price is higher compared to using a stablecoin as collateral since the worth of the collateral will change with its price. If required and available, you can change the collateral type using the \"Collateral In\" option in the trade box." - #: src/components/Synthetics/Claims/SettleAccruedCard.tsx msgid "Accrued Price Impact Rebates. They will become Claimable after some time.<0/><1/><2>Read more." msgstr "Accrued Price Impact Rebates. They will become Claimable after some time.<0/><1/><2>Read more." @@ -2861,10 +2850,6 @@ msgstr "Direction" msgid "GM can be sold for {0} and {1} for this market up to the specified selling caps. The remaining tokens in the pool are reserved for currently open positions." msgstr "GM can be sold for {0} and {1} for this market up to the specified selling caps. The remaining tokens in the pool are reserved for currently open positions." -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -msgid "Collateral value may differ due to different Price Impact at the time of execution." -msgstr "Collateral value may differ due to different Price Impact at the time of execution." - #: src/components/Synthetics/ExecutionPriceRow.tsx #: src/components/Synthetics/TradeHistory/TradeHistoryRow/utils/position.ts #: src/components/Synthetics/TradeHistory/TradeHistoryRow/utils/position.ts @@ -2967,6 +2952,10 @@ msgstr "Vest with GMX on Arbitrum" msgid "{longOrShort} positions {fundingAction} a funding fee of {fundingRate} per hour and {borrowAction} a borrow fee of {borrowRate} per hour." msgstr "{longOrShort} positions {fundingAction} a funding fee of {fundingRate} per hour and {borrowAction} a borrow fee of {borrowRate} per hour." +#: src/components/Synthetics/TradeBox/TradeBoxRows/LimitAndTPSLRows.tsx +msgid "Limit / TP / SL" +msgstr "Limit / TP / SL" + #: src/components/Exchange/OrderEditor.js #: src/components/Synthetics/OrderEditor/OrderEditor.tsx msgid "Updating Order..." @@ -3029,8 +3018,8 @@ msgstr "No trades yet" #: src/components/Exchange/ConfirmationBox.js #: src/components/Exchange/PositionSeller.js #: src/components/SettingsModal/SettingsModal.tsx -#: src/components/Synthetics/ConfirmationBox/rows/AllowedSlippageRow.tsx #: src/components/Synthetics/PositionSeller/rows/AllowedSlippageRow.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/AllowedSlippageRow.tsx msgid "Allowed Slippage" msgstr "Allowed Slippage" @@ -3147,12 +3136,11 @@ msgstr "Swap submitted." #: src/components/Exchange/PositionSeller.js #: src/components/Exchange/PositionsList.js #: src/components/Exchange/TradeHistory.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/PositionItem/PositionItem.tsx #: src/components/Synthetics/PositionItem/PositionItem.tsx -#: src/components/Synthetics/PositionSeller/PositionSeller.tsx -#: src/components/Synthetics/PositionSeller/PositionSeller.tsx -#: src/components/Synthetics/TradeBox/TradeBox.tsx +#: src/components/Synthetics/PositionSeller/PositionSellerAdvancedDisplayRows.tsx +#: src/components/Synthetics/PositionSeller/PositionSellerAdvancedDisplayRows.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/AdvancedDisplayRows.tsx #: src/components/Synthetics/TradeHistory/TradeHistoryRow/utils/position.ts #: src/pages/AccountDashboard/DailyAndCumulativePnL.tsx #: src/pages/Actions/ActionsV1/ActionsV1.tsx @@ -3176,6 +3164,7 @@ msgstr "No claims yet" #: src/components/Exchange/PositionEditor.js #: src/components/Exchange/PositionEditor.js #: src/components/Synthetics/PositionEditor/PositionEditor.tsx +#: src/components/Synthetics/PositionEditor/types.ts #: src/components/Synthetics/SubaccountModal/SubaccountModal.tsx #: src/components/Synthetics/TradeHistory/keys.ts #: src/pages/Stake/StakeV2.tsx @@ -3261,8 +3250,8 @@ msgstr "The position will be opened at {0} USD with a max slippage of {1}%.<0/>< msgid "Active Referral Code" msgstr "Active Referral Code" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/PositionEditor/PositionEditor.tsx +#: src/components/Synthetics/TradeBox/hooks/useTradeWarningsRows.tsx msgid "Pending {0} approval" msgstr "Pending {0} approval" @@ -3274,6 +3263,10 @@ msgstr "Please switch your network to Arbitrum." msgid "The position would be immediately liquidated upon order execution. Try reducing the size." msgstr "The position would be immediately liquidated upon order execution. Try reducing the size." +#: src/components/Synthetics/TradeBox/TradeBoxRows/OneClickTrading.tsx +msgid "Enable" +msgstr "Enable" + #: src/components/Synthetics/GmList/GmList.tsx #: src/components/Synthetics/MarketTokenSelector/MarketTokenSelector.tsx msgid "BUYABLE" @@ -3305,6 +3298,10 @@ msgstr "Collateral is not enough to cover pending Fees. Please uncheck \"Keep Le msgid "You have yet to reach the minimum \"Capital Used\" of {0} to qualify for the rankings." msgstr "You have yet to reach the minimum \"Capital Used\" of {0} to qualify for the rankings." +#: src/components/Synthetics/TradeBox/TradeBoxRows/LimitPriceRow.tsx +msgid "The execution price for the limit order updates in real-time on the orders tab after order creation to guarantee that you receive the minimum receive amount." +msgstr "The execution price for the limit order updates in real-time on the orders tab after order creation to guarantee that you receive the minimum receive amount." + #: src/components/Exchange/SwapBox.js msgid "Swap amount exceeds Available Liquidity." msgstr "Swap amount exceeds Available Liquidity." @@ -3326,8 +3323,8 @@ msgstr "Prev" msgid "Unknown buy GM order" msgstr "Unknown buy GM order" -#: src/components/Synthetics/ConfirmationBox/rows/AllowedSlippageRow.tsx #: src/components/Synthetics/PositionSeller/rows/AllowedSlippageRow.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/AllowedSlippageRow.tsx msgid "You can edit the default Allowed Slippage in the settings menu on the top right of the page.<0/><1/>Note that a low allowed slippage, e.g. less than -{0}, may result in failed orders if prices are volatile." msgstr "You can edit the default Allowed Slippage in the settings menu on the top right of the page.<0/><1/>Note that a low allowed slippage, e.g. less than -{0}, may result in failed orders if prices are volatile." @@ -3363,7 +3360,7 @@ msgstr "Earn" #: src/components/Exchange/SwapBox.js #: src/components/Synthetics/CollateralSelector/CollateralSelector.tsx #: src/components/Synthetics/CollateralSelector/CollateralSelector.tsx -#: src/components/Synthetics/TradeBox/CollateralSelectorRow.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/CollateralSelectorRow.tsx msgid "Collateral In" msgstr "Collateral In" @@ -3383,9 +3380,9 @@ msgstr "Trading guide" msgid "TRADING Airdrop" msgstr "TRADING Airdrop" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -msgid "Limit Order Price to guarantee Min. Receive amount is updated in real time in the Orders tab after the order has been created." -msgstr "Limit Order Price to guarantee Min. Receive amount is updated in real time in the Orders tab after the order has been created." +#: src/components/Synthetics/TradeBox/hooks/useCollateralInTooltipContent.tsx +msgid "You will be short {indexSymbol} from your short position, while being long {collateralSymbol} from your {collateralSymbol} collateral. This can be useful for delta-neutral strategies to earn funding fees." +msgstr "You will be short {indexSymbol} from your short position, while being long {collateralSymbol} from your {collateralSymbol} collateral. This can be useful for delta-neutral strategies to earn funding fees." #: src/components/Referrals/TradersStats.tsx msgid "Rebates earned by this account as a trader." @@ -3448,8 +3445,8 @@ msgstr "Set TP/SL" msgid "The Execution Price didn't meet the Acceptable Price condition. The Order will get filled when the condition is met." msgstr "The Execution Price didn't meet the Acceptable Price condition. The Order will get filled when the condition is met." -#: src/components/Synthetics/PositionEditor/PositionEditor.tsx -#: src/components/Synthetics/PositionSeller/PositionSeller.tsx +#: src/components/Synthetics/PositionEditor/PositionEditorAdvancedRows.tsx +#: src/components/Synthetics/PositionSeller/PositionSellerAdvancedDisplayRows.tsx msgid "Initial Collateral (Collateral excluding Borrow and Funding Fee)." msgstr "Initial Collateral (Collateral excluding Borrow and Funding Fee)." @@ -3469,15 +3466,15 @@ msgstr "Structured Products" #: src/components/AprInfo/AprInfo.tsx #: src/components/AprInfo/AprInfo.tsx #: src/components/Synthetics/AcceptablePriceImpactInputRow/AcceptablePriceImpactInputRow.tsx -#: src/components/Synthetics/PositionSeller/PositionSeller.tsx -#: src/components/Synthetics/TradeBox/TradeBox.tsx +#: src/components/Synthetics/PositionSeller/PositionSellerAdvancedDisplayRows.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/AdvancedDisplayRows.tsx #: src/pages/LeaderboardPage/components/LeaderboardAccountsTable.tsx #: src/pages/LeaderboardPage/components/LeaderboardPositionsTable.tsx #: src/pages/LeaderboardPage/components/LeaderboardPositionsTable.tsx msgid "NA" msgstr "NA" -#: src/components/Synthetics/TradeBox/CollateralSelectorRow.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/CollateralSelectorRow.tsx msgid "You have an existing position with {0} as collateral. This action will not apply for that position. <0>Switch to {1} collateral." msgstr "You have an existing position with {0} as collateral. This action will not apply for that position. <0>Switch to {1} collateral." @@ -3514,10 +3511,6 @@ msgstr "Trigger price for the order." #: src/components/Synthetics/Claims/ClaimHistoryRow/ClaimFundingFeesHistoryRow.tsx #: src/components/Synthetics/Claims/ClaimHistoryRow/ClaimFundingFeesHistoryRow.tsx #: src/components/Synthetics/Claims/ClaimsHistory.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/MarketCard/MarketCard.tsx #: src/components/Synthetics/MarketNetFee/MarketNetFee.tsx #: src/components/Synthetics/PositionEditor/PositionEditor.tsx @@ -3590,8 +3583,6 @@ msgstr "EIP-4844 Competition" #: src/components/Exchange/PositionsList.js #: src/components/Exchange/PositionsList.js #: src/components/Exchange/SwapBox.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/OrderEditor/OrderEditor.tsx #: src/components/Synthetics/PositionEditor/PositionEditor.tsx #: src/components/Synthetics/PositionItem/PositionItem.tsx @@ -3662,10 +3653,6 @@ msgstr "Trade on GMX and win <0>$250.000 in prizes! Live until November 30th msgid "You are leaving GMX.io and will be redirected to a third party, independent website." msgstr "You are leaving GMX.io and will be redirected to a third party, independent website." -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -msgid "You have selected {collateralTokenSymbol} as collateral to short {indexTokenSymbol}." -msgstr "You have selected {collateralTokenSymbol} as collateral to short {indexTokenSymbol}." - #: src/components/Synthetics/PositionItem/PositionItem.tsx #: src/components/Synthetics/PositionItem/PositionItem.tsx msgid "Accrued Borrow Fee" @@ -3701,10 +3688,10 @@ msgstr "Unknown sell GM order" msgid "<0>Notifications are provided by Notifi and not affiliated with GMX. By subscribing, you agree that info you provide to Notifi will be governed by its <1>Privacy Policy<2> and <3>Terms of Use." msgstr "<0>Notifications are provided by Notifi and not affiliated with GMX. By subscribing, you agree that info you provide to Notifi will be governed by its <1>Privacy Policy<2> and <3>Terms of Use." -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/GmSwap/GmConfirmationBox/GmConfirmationBox.tsx #: src/components/Synthetics/PositionEditor/PositionEditor.tsx #: src/components/Synthetics/PositionSeller/PositionSeller.tsx +#: src/components/Synthetics/TradeBox/hooks/useTradeWarningsRows.tsx msgid "High Network Fee not yet acknowledged" msgstr "High Network Fee not yet acknowledged" @@ -3745,11 +3732,6 @@ msgstr "Select a token" msgid "UI Fee" msgstr "UI Fee" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -msgid "Confirm {0} Order" -msgstr "Confirm {0} Order" - #: src/domain/synthetics/orders/simulateExecuteOrderTxn.tsx #: src/domain/synthetics/orders/simulateExecuteOrderTxn.tsx msgid "Execute order simulation failed." @@ -3794,9 +3776,10 @@ msgstr "Docs" #: src/components/Exchange/ConfirmationBox.js #: src/components/Exchange/PositionSeller.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/PositionEditor/PositionEditor.tsx #: src/components/Synthetics/PositionSeller/PositionSeller.tsx +#: src/components/Synthetics/TradeBox/hooks/useTradeButtonState.tsx +#: src/components/Synthetics/TradeBox/TradeBox.tsx msgid "Creating Order..." msgstr "Creating Order..." @@ -4061,7 +4044,6 @@ msgstr "Decreased" #: src/components/Exchange/OrdersList.js #: src/components/Exchange/TradeHistory.js #: src/components/Exchange/TradeHistory.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/domain/synthetics/orders/utils.tsx #: src/pages/OrdersOverview/OrdersOverview.js msgid "Decrease" @@ -4096,11 +4078,15 @@ msgstr "Dec." msgid "GMX Weekly Updates" msgstr "GMX Weekly Updates" +#: src/components/Synthetics/TradeBox/hooks/useCollateralInTooltipContent.tsx +msgid "You will be long {indexSymbol} only from your long position." +msgstr "You will be long {indexSymbol} only from your long position." + #: src/pages/OrdersOverview/OrdersOverview.js msgid "Total active: {openTotal}, executed: {executedTotal}, cancelled: {cancelledTotal}" msgstr "Total active: {openTotal}, executed: {executedTotal}, cancelled: {cancelledTotal}" -#: src/components/Synthetics/TradeBox/CollateralSelectorRow.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/CollateralSelectorRow.tsx msgid "You have an existing order with {symbol} as collateral. <0>Switch to {symbol} collateral." msgstr "You have an existing order with {symbol} as collateral. <0>Switch to {symbol} collateral." @@ -4135,7 +4121,7 @@ msgstr "REBATE" msgid "Yield simulator for GMX" msgstr "Yield simulator for GMX" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/AvailableLiquidityRow.tsx msgid "There may not be sufficient liquidity to execute your order when the Min. Receive are met." msgstr "There may not be sufficient liquidity to execute your order when the Min. Receive are met." @@ -4181,9 +4167,9 @@ msgstr "Wallet total accrued Fees" #: src/components/Exchange/SwapBox.js #: src/components/Exchange/SwapBox.js #: src/components/Exchange/SwapBox.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/MarketCard/MarketCard.tsx #: src/components/Synthetics/SwapCard/SwapCard.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/AvailableLiquidityRow.tsx msgid "Available Liquidity" msgstr "Available Liquidity" @@ -4272,12 +4258,9 @@ msgstr "V1 Avalanche" #: src/components/Exchange/ConfirmationBox.js #: src/components/Exchange/PositionEditor.js #: src/components/Exchange/PositionSeller.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/PositionEditor/PositionEditor.tsx -#: src/components/Synthetics/PositionSeller/PositionSeller.tsx -#: src/components/Synthetics/TradeBox/TradeBox.tsx +#: src/components/Synthetics/PositionEditor/PositionEditorAdvancedRows.tsx +#: src/components/Synthetics/PositionSeller/PositionSellerAdvancedDisplayRows.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/AdvancedDisplayRows.tsx msgid "Collateral ({0})" msgstr "Collateral ({0})" @@ -4289,6 +4272,14 @@ msgstr "Max Network Fee Buffer" msgid "Order updated!" msgstr "Order updated!" +#: src/components/Synthetics/TradeBox/hooks/useCollateralInTooltipContent.tsx +msgid "You will be short {indexSymbol} from your short position, while being long {collateralSymbol} from your {collateralSymbol} collateral. The liquidation price will vary based on the price of {collateralSymbol}." +msgstr "You will be short {indexSymbol} from your short position, while being long {collateralSymbol} from your {collateralSymbol} collateral. The liquidation price will vary based on the price of {collateralSymbol}." + +#: src/components/Synthetics/TradeBox/TradeBoxRows/OneClickTrading.tsx +msgid "The previously authorized maximum number of actions has been reached for One-Click Trading." +msgstr "The previously authorized maximum number of actions has been reached for One-Click Trading." + #: src/components/Synthetics/CollateralSelector/CollateralSelector.tsx #: src/components/Synthetics/CollateralSelector/CollateralSelector.tsx msgid "Select a pool containing {0} to use it as collateral." @@ -4327,7 +4318,6 @@ msgid "Max Leverage without PnL: 100x" msgstr "Max Leverage without PnL: 100x" #: src/components/Exchange/ConfirmationBox.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx msgid "Confirm Short" msgstr "Confirm Short" @@ -4343,10 +4333,6 @@ msgstr "Short Liquidity" msgid "Order Type" msgstr "Order Type" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -msgid "Decrease size" -msgstr "Decrease size" - #: src/components/Synthetics/StatusNotification/GmStatusNotification.tsx msgid "Sell order executed" msgstr "Sell order executed" @@ -4363,13 +4349,9 @@ msgstr "Compound submitted!" msgid "Affiliate Rewards Claimed" msgstr "Affiliate Rewards Claimed" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -msgid "Old Collateral" -msgstr "Old Collateral" - #: src/components/Exchange/ConfirmationBox.js #: src/components/Exchange/PositionSeller.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/SwapSpreadRow.tsx msgid "Spread" msgstr "Spread" @@ -4405,6 +4387,10 @@ msgstr "Loading..." msgid "Leaderboard for GMX traders" msgstr "Leaderboard for GMX traders" +#: src/components/Synthetics/TradeBox/TradeBoxRows/OneClickTrading.tsx +msgid "There are insufficient funds in your subaccount for One-Click Trading" +msgstr "There are insufficient funds in your subaccount for One-Click Trading" + #: src/components/Exchange/PositionsList.js msgid "Share" msgstr "Share" @@ -4549,7 +4535,7 @@ msgstr "{0} GMX tokens can be claimed, use the options under the Total Rewards s msgid "GLP autocompounding vaults" msgstr "GLP autocompounding vaults" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx +#: src/components/Synthetics/TradeBox/hooks/useTradeButtonState.tsx msgid "TP/SL orders exceed the position" msgstr "TP/SL orders exceed the position" @@ -4578,7 +4564,7 @@ msgstr "When closing the position, you can select which token you would like to msgid "Top PnL (%)" msgstr "Top PnL (%)" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/AvailableLiquidityRow.tsx #: src/domain/synthetics/orders/utils.tsx msgid "There may not be sufficient liquidity to execute your order when the price conditions are met." msgstr "There may not be sufficient liquidity to execute your order when the price conditions are met." @@ -4777,7 +4763,7 @@ msgstr "Last 7 days" msgid "Begin Transfer" msgstr "Begin Transfer" -#: src/components/SubaccountNavigationButton/SubaccountNavigationButton.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/OneClickTrading.tsx msgid "One-Click Trading is not available for wrapping or unwrapping native token {0}." msgstr "One-Click Trading is not available for wrapping or unwrapping native token {0}." @@ -4826,7 +4812,7 @@ msgstr "Governance" msgid "Cancel" msgstr "Cancel" -#: src/components/Synthetics/ConfirmationBox/SideOrderEntries.tsx +#: src/components/Synthetics/TradeBox/components/SideOrderEntries.tsx msgid "Remove Row" msgstr "Remove Row" @@ -4852,10 +4838,6 @@ msgstr "Order cancelled." msgid "Buy or Transfer AVAX to Avalanche" msgstr "Buy or Transfer AVAX to Avalanche" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -msgid "You have selected {collateralTokenSymbol} as Collateral, the Liquidation Price will vary based on the price of {collateralTokenSymbol}." -msgstr "You have selected {collateralTokenSymbol} as Collateral, the Liquidation Price will vary based on the price of {collateralTokenSymbol}." - #: src/pages/Ecosystem/Ecosystem.js msgid "Telegram bot for Open Interest on GMX" msgstr "Telegram bot for Open Interest on GMX" @@ -4906,7 +4888,7 @@ msgstr "Spreadsheet for position calculations" msgid "Enter new amount or price" msgstr "Enter new amount or price" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/LimitAndTPSLRows.tsx msgid "Stop-Loss PnL" msgstr "Stop-Loss PnL" @@ -5037,7 +5019,7 @@ msgstr "Volume traded by your referred traders." msgid "Stablecoin Percentage" msgstr "Stablecoin Percentage" -#: src/components/Synthetics/TradeBox/CollateralSelectorRow.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/CollateralSelectorRow.tsx msgid "You have an existing position with {0} as collateral. This Order will not be valid for that Position. <0>Switch to {1} collateral." msgstr "You have an existing position with {0} as collateral. This Order will not be valid for that Position. <0>Switch to {1} collateral." @@ -5272,6 +5254,10 @@ msgstr "We want your insights to help improve GMX. For security reasons, we won' msgid "Claim esGMX" msgstr "Claim esGMX" +#: src/components/Synthetics/TradeBox/TradeBoxRows/OneClickTrading.tsx +msgid "Re-authorize" +msgstr "Re-authorize" + #: src/pages/BuyGMX/BuyGMX.tsx msgid "Buy or Transfer ETH to Arbitrum" msgstr "Buy or Transfer ETH to Arbitrum" @@ -5452,10 +5438,6 @@ msgstr "Buy GLP or GMX" msgid "Max Out" msgstr "Max Out" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -msgid "The order will only execute if the Min. Receive is met and there is sufficient liquidity." -msgstr "The order will only execute if the Min. Receive is met and there is sufficient liquidity." - #: src/components/Exchange/PositionEditor.js #: src/components/Exchange/PositionSeller.js #: src/components/Exchange/PositionSeller.js @@ -5683,7 +5665,7 @@ msgstr "Open {0} in Explorer" msgid "{0} and {1} can be used to buy GM for this market up to the specified buying caps." msgstr "{0} and {1} can be used to buy GM for this market up to the specified buying caps." -#: src/components/SubaccountNavigationButton/SubaccountNavigationButton.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/OneClickTrading.tsx msgid "One-Click Trading is not available using network's native token {0}. Consider using {1} instead." msgstr "One-Click Trading is not available using network's native token {0}. Consider using {1} instead." @@ -5761,8 +5743,7 @@ msgstr "Withdrawal failed." #: src/components/Exchange/ConfirmationBox.js #: src/components/Exchange/ConfirmationBox.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/LimitPriceRow.tsx msgid "Limit Price" msgstr "Limit Price" @@ -5786,6 +5767,7 @@ msgstr "Could not execute deposit into {0} {longOrShortText}" #: src/components/Exchange/PositionEditor.js #: src/components/Exchange/PositionEditor.js #: src/components/Synthetics/PositionEditor/PositionEditor.tsx +#: src/components/Synthetics/PositionEditor/types.ts #: src/components/Synthetics/TradeHistory/keys.ts #: src/pages/Stake/StakeV2.tsx #: src/pages/Stake/StakeV2.tsx @@ -5821,10 +5803,6 @@ msgstr "Enabling Leverage..." msgid "There may not be sufficient liquidity to execute the swap to the receive token when the price conditions are met." msgstr "There may not be sufficient liquidity to execute the swap to the receive token when the price conditions are met." -#: src/components/SubaccountNavigationButton/SubaccountNavigationButton.tsx -msgid "Enable One-Click Trading" -msgstr "Enable One-Click Trading" - #: src/components/NotifyModal/NotifyModal.tsx msgid "Trade Errors" msgstr "Trade Errors" @@ -5848,8 +5826,6 @@ msgstr "Claim <0>{0}" #: src/components/Exchange/SwapBox.js #: src/components/Glp/GlpSwap.js #: src/components/Glp/GlpSwap.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/GmSwap/GmConfirmationBox/GmConfirmationBox.tsx #: src/components/Synthetics/GmSwap/GmConfirmationBox/GmConfirmationBox.tsx #: src/components/Synthetics/GmSwap/GmSwapBox/GmSwapBox.tsx @@ -5917,9 +5893,9 @@ msgstr "Transfer {nativeTokenSymbol}" msgid "There are insufficient funds in your Subaccount for One-Click Trading. <0>Click here to top-up." msgstr "There are insufficient funds in your Subaccount for One-Click Trading. <0>Click here to top-up." -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx +#: src/components/Synthetics/TradeBox/hooks/useTradeboxTransactions.tsx +#: src/components/Synthetics/TradeBox/hooks/useTradeboxTransactions.tsx +#: src/components/Synthetics/TradeBox/hooks/useTradeboxTransactions.tsx msgid "Error submitting order" msgstr "Error submitting order" @@ -6015,10 +5991,6 @@ msgstr "{positionName} Failed to settle" msgid "Rebates" msgstr "Rebates" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -msgid "The spread is > 1%, please ensure the trade details are acceptable before comfirming" -msgstr "The spread is > 1%, please ensure the trade details are acceptable before comfirming" - #: src/components/Glp/GlpSwap.js msgid "Sell failed." msgstr "Sell failed." @@ -6052,7 +6024,7 @@ msgstr "Claims" msgid "Date" msgstr "Date" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx +#: src/components/Synthetics/TradeBox/hooks/useTradeWarningsRows.tsx #: src/domain/synthetics/trade/utils/validation.ts #: src/domain/synthetics/trade/utils/validation.ts #: src/domain/synthetics/trade/utils/validation.ts @@ -6092,7 +6064,6 @@ msgid "Price above Mark Price" msgstr "Price above Mark Price" #: src/components/Exchange/PositionSeller.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/OrderItem/OrderItem.tsx #: src/components/Synthetics/OrderList/OrderList.tsx #: src/components/Synthetics/PositionSeller/PositionSeller.tsx @@ -6173,7 +6144,7 @@ msgstr "Keep leverage at {0}x" msgid "The amount left in the subaccount is not enough to cover network gas costs." msgstr "The amount left in the subaccount is not enough to cover network gas costs." -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/LimitAndTPSLRows.tsx msgid "Take-Profit PnL" msgstr "Take-Profit PnL" @@ -6414,10 +6385,6 @@ msgstr "Fulfilling Sell request" #: src/components/Synthetics/Claims/ClaimHistoryRow/ClaimFundingFeesHistoryRow.tsx #: src/components/Synthetics/Claims/ClaimHistoryRow/ClaimFundingFeesHistoryRow.tsx #: src/components/Synthetics/Claims/ClaimsHistory.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/MarketCard/MarketCard.tsx #: src/components/Synthetics/MarketNetFee/MarketNetFee.tsx #: src/components/Synthetics/PositionEditor/PositionEditor.tsx @@ -6560,7 +6527,6 @@ msgid "Failed Settlement of Funding Fees" msgstr "Failed Settlement of Funding Fees" #: src/components/Exchange/ConfirmationBox.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx msgid "Pay Amount" msgstr "Pay Amount" @@ -6630,7 +6596,7 @@ msgstr "Traders" msgid "{ordersText} cancelled" msgstr "{ordersText} cancelled" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx +#: src/components/Synthetics/TradeBox/hooks/useTradeButtonState.tsx msgid "Limit price below Mark Price" msgstr "Limit price below Mark Price" @@ -6655,7 +6621,7 @@ msgid "Transaction was cancelled." msgstr "Transaction was cancelled." #: src/components/Exchange/ConfirmationBox.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx +#: src/components/Synthetics/TradeBox/hooks/useTradeButtonState.tsx msgid "Accept confirmation of trigger orders" msgstr "Accept confirmation of trigger orders" @@ -6926,10 +6892,6 @@ msgstr "You have a pending transfer from {sender}." msgid "Enter a trigger price" msgstr "Enter a trigger price" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -msgid "Limit Order Price will vary based on Fees and Price Impact to guarantee the Min. Receive amount." -msgstr "Limit Order Price will vary based on Fees and Price Impact to guarantee the Min. Receive amount." - #: src/pages/BeginAccountTransfer/BeginAccountTransfer.tsx msgid "Vested GLP not withdrawn" msgstr "Vested GLP not withdrawn" @@ -6941,11 +6903,9 @@ msgstr "Vested GLP not withdrawn" #: src/components/Exchange/PositionsList.js #: src/components/Exchange/SwapBox.js #: src/components/Exchange/SwapBox.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/PositionEditor/PositionEditor.tsx #: src/components/Synthetics/PositionItem/PositionItem.tsx #: src/components/Synthetics/PositionList/PositionList.tsx -#: src/components/Synthetics/TradeBox/TradeBox.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/EntryPriceRow.tsx #: src/pages/LeaderboardPage/components/LeaderboardPositionsTable.tsx msgid "Entry Price" msgstr "Entry Price" @@ -6968,6 +6928,7 @@ msgstr "Limit Decrease" #: src/components/AddressDropdown/AddressDropdown.tsx #: src/components/Synthetics/SubaccountModal/SubaccountModal.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/OneClickTrading.tsx msgid "One-Click Trading" msgstr "One-Click Trading" @@ -7031,11 +6992,10 @@ msgid "SELL…" msgstr "SELL…" #: src/components/Exchange/ConfirmationBox.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx msgid "Confirm Swap" msgstr "Confirm Swap" -#: src/components/Synthetics/PositionSeller/PositionSeller.tsx +#: src/components/Synthetics/PositionSeller/PositionSellerAdvancedDisplayRows.tsx msgid "Keep leverage is not available as Position exceeds max. allowed leverage. <0>Read more." msgstr "Keep leverage is not available as Position exceeds max. allowed leverage. <0>Read more." @@ -7099,6 +7059,10 @@ msgstr "2nd Place" msgid "<0>The APY is an estimate based on the fees collected for the past seven days, extrapolating the current borrowing fee. It excludes:<1><2>price changes of the underlying token(s)<3>traders' PnL, which is expected to be neutral in the long term<4>funding fees, which are exchanged between traders<5><6>Read more about GM token pricing.<7>Check GM pools' performance against other LP Positions in the <8>GMX Dune Dashboard." msgstr "<0>The APY is an estimate based on the fees collected for the past seven days, extrapolating the current borrowing fee. It excludes:<1><2>price changes of the underlying token(s)<3>traders' PnL, which is expected to be neutral in the long term<4>funding fees, which are exchanged between traders<5><6>Read more about GM token pricing.<7>Check GM pools' performance against other LP Positions in the <8>GMX Dune Dashboard." +#: src/components/Synthetics/TradeBox/TradeBoxRows/OneClickTrading.tsx +msgid "Top-Up" +msgstr "Top-Up" + #: src/components/Synthetics/MarketCard/MarketCard.tsx msgid "Ask Price (Exit)" msgstr "Ask Price (Exit)" @@ -7111,6 +7075,10 @@ msgstr "Not enough {0} on your Main Account. Use the \"<0>Convert {1} to {2} msgid "Orders ({ordersCount})" msgstr "Orders ({ordersCount})" +#: src/components/Synthetics/TradeBox/hooks/useCollateralInTooltipContent.tsx +msgid "You will be long {indexSymbol} from your long position, as well as from your {collateralSymbol} collateral. The liquidation price is higher compared to using a stablecoin as collateral since the worth of the collateral will change with its price." +msgstr "You will be long {indexSymbol} from your long position, as well as from your {collateralSymbol} collateral. The liquidation price is higher compared to using a stablecoin as collateral since the worth of the collateral will change with its price." + #: src/pages/Ecosystem/Ecosystem.js msgid "GMX explorer for stats and traders" msgstr "GMX explorer for stats and traders" @@ -7156,7 +7124,7 @@ msgstr "Total accrued Fees" msgid "Fee values do not include incentives." msgstr "Fee values do not include incentives." -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx +#: src/components/Synthetics/TradeBox/hooks/useTradeButtonState.tsx msgid "Limit price above Mark Price" msgstr "Limit price above Mark Price" @@ -7172,7 +7140,6 @@ msgstr "Activate Subaccount" #: src/components/Exchange/SwapBox.js #: src/components/Exchange/SwapBox.js #: src/components/Exchange/SwapBox.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/OrderList/filters/OrderTypeFilter.tsx #: src/components/Synthetics/StatusNotification/OrderStatusNotification.tsx #: src/components/Synthetics/SwapCard/SwapCard.tsx @@ -7334,10 +7301,8 @@ msgstr "Deposit amount is insufficient to bring leverage below the max allowed l #: src/components/Exchange/PositionSeller.js #: src/components/Exchange/PositionsList.js #: src/components/Exchange/PositionsList.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/OrderItem/OrderItem.tsx #: src/components/Synthetics/OrderList/OrderList.tsx -#: src/components/Synthetics/PositionEditor/PositionEditor.tsx #: src/components/Synthetics/PositionItem/PositionItem.tsx #: src/components/Synthetics/PositionList/PositionList.tsx #: src/components/Synthetics/TradeHistory/useDownloadAsCsv.tsx @@ -7444,7 +7409,7 @@ msgid "short" msgstr "short" #: src/components/Exchange/ConfirmationBox.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx +#: src/components/Synthetics/TradeBox/hooks/useTriggerOrdersConsent.tsx msgid "I am aware of the trigger orders" msgstr "I am aware of the trigger orders" @@ -7489,12 +7454,12 @@ msgstr "Order Execution Price" #: src/components/Exchange/ConfirmationBox.js #: src/components/Exchange/PositionSeller.js -#: src/components/Synthetics/ConfirmationBox/rows/AllowedSlippageRow.tsx #: src/components/Synthetics/PositionSeller/rows/AllowedSlippageRow.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/AllowedSlippageRow.tsx msgid "Slippage is too high" msgstr "Slippage is too high" -#: src/components/Synthetics/ConfirmationBox/SideOrderEntries.tsx +#: src/components/Synthetics/TradeBox/components/SideOrderEntries.tsx msgid "Add Row" msgstr "Add Row" @@ -7549,12 +7514,12 @@ msgstr "Anonymous chat with GMX" #: src/components/Exchange/OrdersList.js #: src/components/Exchange/OrdersList.js #: src/components/Exchange/SwapBox.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/OrderEditor/OrderEditor.tsx #: src/components/Synthetics/OrderItem/OrderItem.tsx #: src/components/Synthetics/OrderList/filters/OrderTypeFilter.tsx #: src/components/Synthetics/PositionItem/PositionItem.tsx #: src/components/Synthetics/TradeBox/TradeBox.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/LimitAndTPSLRows.tsx #: src/components/Synthetics/TradeHistory/keys.ts msgid "Limit" msgstr "Limit" @@ -7577,7 +7542,6 @@ msgid "<0>Insufficient liquidity to execute the order<1>The mark price which msgstr "<0>Insufficient liquidity to execute the order<1>The mark price which is an aggregate of exchange prices did not reach the specified price<2>The specified price was reached but not long enough for it to be executed<3>No keeper picked up the order for execution" #: src/components/Exchange/ConfirmationBox.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx msgid "Your position's collateral after deducting fees:" msgstr "Your position's collateral after deducting fees:" @@ -7627,8 +7591,8 @@ msgstr "Max Network Fee" msgid "01 Sep 2021" msgstr "01 Sep 2021" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/OrderList/filters/OrderTypeFilter.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/LimitAndTPSLRows.tsx #: src/domain/synthetics/positions/utils.ts msgid "Take-Profit" msgstr "Take-Profit" diff --git a/src/locales/es/messages.po b/src/locales/es/messages.po index 9b094ed12c..69429b9166 100644 --- a/src/locales/es/messages.po +++ b/src/locales/es/messages.po @@ -79,7 +79,6 @@ msgid "Subaccount generation failed" msgstr "" #: src/components/Exchange/ConfirmationBox.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx msgid "{existingTriggerOrderLength, plural, one {You have an active trigger order that might execute immediately after you open this position. Please cancel the order or accept the confirmation to continue.} other {You have # active trigger orders that might execute immediately after you open this position. Please cancel the orders or accept the confirmation to continue.}}" msgstr "{existingTriggerOrderLength, plural, one {Tienes activa una orden de activación que podría ejecutarse inmediatamente después de que abras esta posición. Por favor, cancela la orden o acepta la confirmación para continuar.} other {Tienes # órdenes de activación activas que podrían ejecutarse inmediatamente después de que abras la posición. Por favor, cancela las órdenes o acepta la confirmación para continuar.}}" @@ -155,6 +154,10 @@ msgstr "{0} está por encima de su peso objetivo.<0/><1/>Consigue menores comisi msgid "Withdrawal error." msgstr "" +#: src/components/Synthetics/TradeBox/TradeBox.tsx +msgid "The execution price will constantly vary based on fees and price impact to guarantee that you receive the minimum receive amount." +msgstr "" + #: src/pages/Home/Home.js msgid "Decentralized<0/>Perpetual Exchange" msgstr "Exchange<0/>Perpetuo Decentralizado" @@ -236,7 +239,6 @@ msgstr "" #: src/components/Glp/GlpSwap.js #: src/components/Glp/GlpSwap.js #: src/components/Glp/GlpSwap.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/OrderEditor/OrderEditor.tsx #: src/components/Synthetics/TradeFeesRow/TradeFeesRow.tsx msgid "Fees" @@ -403,8 +405,6 @@ msgid "Insufficient liquidity in the {0} market pool. Select a different pool fo msgstr "" #: src/components/Exchange/ConfirmationBox.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx msgid "Confirm Limit Order" msgstr "" @@ -515,6 +515,7 @@ msgstr "" msgid "Incentives are airdropped weekly." msgstr "" +#: src/components/Synthetics/AcceptablePriceImpactInputRow/AcceptablePriceImpactInputRow.tsx #: src/components/Synthetics/AcceptablePriceImpactInputRow/AcceptablePriceImpactInputRow.tsx msgid "Acceptable Price Impact" msgstr "" @@ -527,10 +528,6 @@ msgstr "Añadir a Metamask" msgid "Insufficient staked tokens" msgstr "" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -msgid "New Collateral" -msgstr "" - #: src/lib/wallets/connecters/binanceW3W/binanceWallet.ts msgid "Tap [Create Wallet] to start using your Web3 Wallet." msgstr "Toca [Crear cartera] para empezar a usar tu cartera Web3." @@ -721,8 +718,6 @@ msgstr "" #: src/components/Exchange/SwapBox.js #: src/components/Glp/GlpSwap.js #: src/components/Glp/GlpSwap.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/GmSwap/GmConfirmationBox/GmConfirmationBox.tsx #: src/components/Synthetics/GmSwap/GmConfirmationBox/GmConfirmationBox.tsx #: src/components/Synthetics/GmSwap/GmSwapBox/GmSwapBox.tsx @@ -747,8 +742,8 @@ msgstr "Página de Gobernanza GMX" msgid "Decentralized Money Market" msgstr "" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/OrderList/filters/OrderTypeFilter.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/LimitAndTPSLRows.tsx #: src/domain/synthetics/positions/utils.ts msgid "Stop-Loss" msgstr "" @@ -774,10 +769,6 @@ msgstr "{0} GLP se han reservado para adquisiciones." msgid "Buy with {0}" msgstr "Compra con {0}" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -msgid "You have an existing position with {0} as collateral. This Order will not be valid for that Position." -msgstr "Tienes una posición existente con {0} como garantía. Esta Orden no será válida para esa Posición." - #: src/components/Referrals/JoinReferralCode.js msgid "Adding..." msgstr "Añadiendo..." @@ -891,8 +882,8 @@ msgid "Unstake completed!" msgstr "" #: src/components/Exchange/ConfirmationBox.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/OrderEditor/OrderEditor.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/MinReceiveRow.tsx msgid "Min. Receive" msgstr "Min. a Recibir" @@ -931,8 +922,6 @@ msgstr "" #: src/components/Exchange/OrdersList.js #: src/components/Exchange/PositionsList.js #: src/components/Exchange/PositionsList.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/MarketStats/MarketStats.tsx #: src/components/Synthetics/OrderItem/OrderItem.tsx #: src/components/Synthetics/PositionItem/PositionItem.tsx @@ -1191,8 +1180,7 @@ msgstr "Bot de Telegram para actualización de posiciones GMX" msgid "account" msgstr "cuenta" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/TradeBox/TradeBox.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/AdvancedDisplayRows.tsx msgid "Keep leverage at {0}" msgstr "" @@ -1299,6 +1287,10 @@ msgstr "" msgid "Select Positions" msgstr "" +#: src/components/Synthetics/TradeBox/hooks/useCollateralInTooltipContent.tsx +msgid "You will be long {indexSymbol} from your long position, while being long {collateralSymbol} from your {collateralSymbol} collateral. The liquidation price will vary based on the price of {collateralSymbol}." +msgstr "" + #: src/components/Referrals/AffiliatesStats.tsx #: src/components/Referrals/AffiliatesStats.tsx #: src/components/Referrals/TradersStats.tsx @@ -1552,7 +1544,7 @@ msgstr "" msgid "Mark" msgstr "" -#: src/components/Synthetics/PositionSeller/PositionSeller.tsx +#: src/components/Synthetics/PositionSeller/PositionSellerAdvancedDisplayRows.tsx msgid "Keep leverage at {keepLeverageAtValue}" msgstr "" @@ -1708,7 +1700,7 @@ msgstr "Comprobando código..." msgid "GM Pools" msgstr "" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/AvailableLiquidityRow.tsx msgid "The order will only execute if the price conditions are met and there is sufficient liquidity." msgstr "" @@ -1747,16 +1739,14 @@ msgstr "" #: src/components/Exchange/PositionsList.js #: src/components/Synthetics/Claims/ClaimsHistory.tsx #: src/components/Synthetics/Claims/ClaimsHistory.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/OrderEditor/OrderEditor.tsx #: src/components/Synthetics/OrderItem/OrderItem.tsx #: src/components/Synthetics/OrderList/OrderList.tsx -#: src/components/Synthetics/PositionEditor/PositionEditor.tsx +#: src/components/Synthetics/PositionEditor/PositionEditorAdvancedRows.tsx #: src/components/Synthetics/PositionItem/PositionItem.tsx #: src/components/Synthetics/PositionList/PositionList.tsx -#: src/components/Synthetics/PositionSeller/PositionSeller.tsx -#: src/components/Synthetics/TradeBox/TradeBox.tsx +#: src/components/Synthetics/PositionSeller/PositionSellerAdvancedDisplayRows.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/AdvancedDisplayRows.tsx #: src/components/Synthetics/TradeHistory/TradeHistory.tsx #: src/components/Synthetics/TradeHistory/useDownloadAsCsv.tsx #: src/pages/LeaderboardPage/components/LeaderboardPositionsTable.tsx @@ -1894,6 +1884,11 @@ msgstr "" msgid "{0} Approved!" msgstr "¡{0} Aprobado!" +#: src/components/Synthetics/PositionEditor/PositionEditorAdvancedRows.tsx +#: src/components/Synthetics/PositionSeller/PositionSellerAdvancedDisplayRows.tsx +msgid "Advanced display" +msgstr "" + #: src/components/Exchange/SwapBox.js msgid "Long {0}" msgstr "Largo {0}" @@ -1917,7 +1912,7 @@ msgid "Total Trading Volume" msgstr "Volumen Total de Operaciones" #: src/components/Exchange/ConfirmationBox.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/CollateralSpreadRow.tsx msgid "Collateral Spread" msgstr "" @@ -2001,10 +1996,6 @@ msgstr "" msgid "Allow {0} to be spent" msgstr "" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -msgid "You have an existing position with {0} as collateral. This action will not apply for that position." -msgstr "Tienes una posición existente con {0} como garantía. Esta acción no se aplicará para esa posición." - #: src/components/Exchange/SwapBox.js msgid "Swap Order created!" msgstr "¡Orden de Intercambio creada!" @@ -2053,7 +2044,7 @@ msgstr "" msgid "{existingTriggerOrderLength, plural, one {You have an active trigger order that could impact this position.} other {You have # active trigger orders that could impact this position.}}" msgstr "{existingTriggerOrderLength, plural, one {Tienes activa una orden de activación que podría impactar esta posición.} other {Tienes # órdenes de activación activas que podrían impactar esta posición.}}" -#: src/components/SubaccountNavigationButton/SubaccountNavigationButton.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/OneClickTrading.tsx msgid "Reduce wallet signing popups with One-Click Trading. This option is also available through the Wallet menu in the top right. <0>Read more." msgstr "Reduce las ventanas emergentes de firma de billetera con el trading de un clic. Esta opción también está disponible a través del menú de la billetera en la parte superior derecha. <0>Leer más." @@ -2069,7 +2060,6 @@ msgstr "" msgid "Swap {0} USDG for{1} {2}" msgstr "" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/OrderItem/OrderItem.tsx msgid "{0} will be swapped to {1} on order execution." msgstr "" @@ -2127,8 +2117,6 @@ msgstr "" #: src/components/Exchange/ConfirmationBox.js #: src/components/Exchange/SwapBox.js #: src/components/Exchange/SwapBox.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/SwapCard/SwapCard.tsx #: src/components/Synthetics/SwapCard/SwapCard.tsx msgid "{0} Price" @@ -2237,6 +2225,10 @@ msgstr "Precio inferior al Precio de Marca" msgid "APRs are updated weekly on Wednesday and will depend on the fees collected for the week." msgstr "Los APRs se actualizan semanalmente en Miércoles, y dependerán de las comisiones cobradas en la semana." +#: src/components/Synthetics/TradeBox/TradeBoxRows/AdvancedDisplayRows.tsx +msgid "Advanced Display" +msgstr "" + #: src/components/Synthetics/SubaccountModal/utils.ts msgid "Generate & Activate Subaccount" msgstr "" @@ -2294,7 +2286,6 @@ msgid "Couldn't find a swap route with enough liquidity" msgstr "" #: src/components/Exchange/ConfirmationBox.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx msgid "Confirm Long" msgstr "Confirma orden a Largo" @@ -2345,6 +2336,10 @@ msgstr "Cantidad disponible para retirar de GLP. Fondos no utilizados por posici msgid "Invalid price, see warning" msgstr "Precio no válido, ver advertencia" +#: src/components/Synthetics/TradeBox/hooks/useCollateralInTooltipContent.tsx +msgid "You will be short {indexSymbol} only from your short position." +msgstr "" + #: src/pages/Actions/ActionsV1/ActionsV1.tsx msgid "GMX V1 {networkName} actions for all accounts." msgstr "" @@ -2361,6 +2356,10 @@ msgstr "" msgid "You need to select {swapTokenSymbol} as the \"Pay\" token to use it for collateral to initiate this trade." msgstr "Tienes que seleccionar {swapTokenSymbol} como el token de \"Pagar\" para usar como garantía para iniciar esta operación." +#: src/components/Synthetics/TradeBox/TradeBoxRows/LimitAndTPSLRows.tsx +msgid "There are issues in the TP/SL orders." +msgstr "" + #: src/components/Glp/GlpSwap.js msgid "The Bonus Rebate is an estimate and will be airdropped as ARB tokens when migrating this liquidity to GM pools within the same epoch. <0>Read more." msgstr "" @@ -2398,9 +2397,12 @@ msgstr "Cantidad Actual en la Reserva" msgid "Cancel failed." msgstr "Cancelación fallida." +#: src/components/Synthetics/TradeBox/TradeBoxRows/AvailableLiquidityRow.tsx +msgid "The order will be executed if there is sufficient liquidity and the execution price guarantees that you will receive the minimum receive amount." +msgstr "" + #: src/components/Exchange/ConfirmationBox.js #: src/components/Exchange/PositionSeller.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx msgid "Transacting with a depegged stable coin is subject to spreads reflecting the worse of current market price or $1.00, with transactions involving multiple stablecoins may have multiple spreads." msgstr "" @@ -2445,10 +2447,6 @@ msgstr "Seleccionar Idioma" msgid "Open positions: {0}<0/>Under risk: {1}" msgstr "Posiciones Abiertas: {0}<0/>Bajo riesgo: {1}" -#: src/components/SubaccountNavigationButton/SubaccountNavigationButton.tsx -msgid "There are insufficient funds in your Subaccount for One-Click Trading. Click here to top-up." -msgstr "" - #: src/components/Exchange/UsefulLinks.tsx msgid "Speed up page loading" msgstr "Acelerar la carga de la página" @@ -2517,10 +2515,6 @@ msgstr "Comercio" msgid "Adding referral code failed." msgstr "Fallo al añadir el código de referido." -#: src/components/SubaccountNavigationButton/SubaccountNavigationButton.tsx -msgid "The previously authorized maximum number of Actions has been reached for One-Click Trading. Click here to re-authorize." -msgstr "" - #: src/components/Exchange/PositionEditor.js msgid "Max leverage without PnL: {0}x" msgstr "" @@ -2680,13 +2674,12 @@ msgstr "" #: src/components/Exchange/PositionSeller.js #: src/components/Exchange/SwapBox.js #: src/components/Exchange/SwapBox.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/OrderEditor/OrderEditor.tsx -#: src/components/Synthetics/PositionEditor/PositionEditor.tsx -#: src/components/Synthetics/PositionSeller/PositionSeller.tsx -#: src/components/Synthetics/TradeBox/TradeBox.tsx -#: src/components/Synthetics/TradeBox/TradeBox.tsx +#: src/components/Synthetics/PositionEditor/PositionEditorAdvancedRows.tsx +#: src/components/Synthetics/PositionSeller/PositionSellerAdvancedDisplayRows.tsx #: src/components/Synthetics/TradeBox/TradeBox.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/AdvancedDisplayRows.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/AdvancedDisplayRows.tsx msgid "Leverage" msgstr "Apalancamiento" @@ -2791,10 +2784,6 @@ msgstr "" msgid "Claim failed." msgstr "Reclamación fallida." -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -msgid "You have selected {collateralTokenSymbol} as collateral; the liquidation price is higher compared to using a stablecoin as collateral since the worth of the collateral will change with its price. If required and available, you can change the collateral type using the \"Collateral In\" option in the trade box." -msgstr "" - #: src/components/Synthetics/Claims/SettleAccruedCard.tsx msgid "Accrued Price Impact Rebates. They will become Claimable after some time.<0/><1/><2>Read more." msgstr "" @@ -2861,10 +2850,6 @@ msgstr "" msgid "GM can be sold for {0} and {1} for this market up to the specified selling caps. The remaining tokens in the pool are reserved for currently open positions." msgstr "" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -msgid "Collateral value may differ due to different Price Impact at the time of execution." -msgstr "" - #: src/components/Synthetics/ExecutionPriceRow.tsx #: src/components/Synthetics/TradeHistory/TradeHistoryRow/utils/position.ts #: src/components/Synthetics/TradeHistory/TradeHistoryRow/utils/position.ts @@ -2967,6 +2952,10 @@ msgstr "Adquiera con GMX en Arbitrum" msgid "{longOrShort} positions {fundingAction} a funding fee of {fundingRate} per hour and {borrowAction} a borrow fee of {borrowRate} per hour." msgstr "" +#: src/components/Synthetics/TradeBox/TradeBoxRows/LimitAndTPSLRows.tsx +msgid "Limit / TP / SL" +msgstr "" + #: src/components/Exchange/OrderEditor.js #: src/components/Synthetics/OrderEditor/OrderEditor.tsx msgid "Updating Order..." @@ -3029,8 +3018,8 @@ msgstr "No hay operaciones todavía" #: src/components/Exchange/ConfirmationBox.js #: src/components/Exchange/PositionSeller.js #: src/components/SettingsModal/SettingsModal.tsx -#: src/components/Synthetics/ConfirmationBox/rows/AllowedSlippageRow.tsx #: src/components/Synthetics/PositionSeller/rows/AllowedSlippageRow.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/AllowedSlippageRow.tsx msgid "Allowed Slippage" msgstr "Deslizamiento permitido" @@ -3147,12 +3136,11 @@ msgstr "Intercambio enviado." #: src/components/Exchange/PositionSeller.js #: src/components/Exchange/PositionsList.js #: src/components/Exchange/TradeHistory.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/PositionItem/PositionItem.tsx #: src/components/Synthetics/PositionItem/PositionItem.tsx -#: src/components/Synthetics/PositionSeller/PositionSeller.tsx -#: src/components/Synthetics/PositionSeller/PositionSeller.tsx -#: src/components/Synthetics/TradeBox/TradeBox.tsx +#: src/components/Synthetics/PositionSeller/PositionSellerAdvancedDisplayRows.tsx +#: src/components/Synthetics/PositionSeller/PositionSellerAdvancedDisplayRows.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/AdvancedDisplayRows.tsx #: src/components/Synthetics/TradeHistory/TradeHistoryRow/utils/position.ts #: src/pages/AccountDashboard/DailyAndCumulativePnL.tsx #: src/pages/Actions/ActionsV1/ActionsV1.tsx @@ -3176,6 +3164,7 @@ msgstr "" #: src/components/Exchange/PositionEditor.js #: src/components/Exchange/PositionEditor.js #: src/components/Synthetics/PositionEditor/PositionEditor.tsx +#: src/components/Synthetics/PositionEditor/types.ts #: src/components/Synthetics/SubaccountModal/SubaccountModal.tsx #: src/components/Synthetics/TradeHistory/keys.ts #: src/pages/Stake/StakeV2.tsx @@ -3261,8 +3250,8 @@ msgstr "La posición se abrirá a {0} USD con un deslizamiento máximo de {1}%.< msgid "Active Referral Code" msgstr "Código de Referido Activo" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/PositionEditor/PositionEditor.tsx +#: src/components/Synthetics/TradeBox/hooks/useTradeWarningsRows.tsx msgid "Pending {0} approval" msgstr "" @@ -3274,6 +3263,10 @@ msgstr "Por favor, cambie su red a Arbitrum." msgid "The position would be immediately liquidated upon order execution. Try reducing the size." msgstr "" +#: src/components/Synthetics/TradeBox/TradeBoxRows/OneClickTrading.tsx +msgid "Enable" +msgstr "" + #: src/components/Synthetics/GmList/GmList.tsx #: src/components/Synthetics/MarketTokenSelector/MarketTokenSelector.tsx msgid "BUYABLE" @@ -3305,6 +3298,10 @@ msgstr "" msgid "You have yet to reach the minimum \"Capital Used\" of {0} to qualify for the rankings." msgstr "" +#: src/components/Synthetics/TradeBox/TradeBoxRows/LimitPriceRow.tsx +msgid "The execution price for the limit order updates in real-time on the orders tab after order creation to guarantee that you receive the minimum receive amount." +msgstr "" + #: src/components/Exchange/SwapBox.js msgid "Swap amount exceeds Available Liquidity." msgstr "" @@ -3326,8 +3323,8 @@ msgstr "Prev" msgid "Unknown buy GM order" msgstr "" -#: src/components/Synthetics/ConfirmationBox/rows/AllowedSlippageRow.tsx #: src/components/Synthetics/PositionSeller/rows/AllowedSlippageRow.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/AllowedSlippageRow.tsx msgid "You can edit the default Allowed Slippage in the settings menu on the top right of the page.<0/><1/>Note that a low allowed slippage, e.g. less than -{0}, may result in failed orders if prices are volatile." msgstr "" @@ -3363,7 +3360,7 @@ msgstr "Ganar" #: src/components/Exchange/SwapBox.js #: src/components/Synthetics/CollateralSelector/CollateralSelector.tsx #: src/components/Synthetics/CollateralSelector/CollateralSelector.tsx -#: src/components/Synthetics/TradeBox/CollateralSelectorRow.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/CollateralSelectorRow.tsx msgid "Collateral In" msgstr "Garantía En" @@ -3383,8 +3380,8 @@ msgstr "Guía de Trading" msgid "TRADING Airdrop" msgstr "" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -msgid "Limit Order Price to guarantee Min. Receive amount is updated in real time in the Orders tab after the order has been created." +#: src/components/Synthetics/TradeBox/hooks/useCollateralInTooltipContent.tsx +msgid "You will be short {indexSymbol} from your short position, while being long {collateralSymbol} from your {collateralSymbol} collateral. This can be useful for delta-neutral strategies to earn funding fees." msgstr "" #: src/components/Referrals/TradersStats.tsx @@ -3445,8 +3442,8 @@ msgstr "" msgid "The Execution Price didn't meet the Acceptable Price condition. The Order will get filled when the condition is met." msgstr "El precio de ejecución no cumplió la condición de precio aceptable. La orden se llenará cuando se cumpla la condición." -#: src/components/Synthetics/PositionEditor/PositionEditor.tsx -#: src/components/Synthetics/PositionSeller/PositionSeller.tsx +#: src/components/Synthetics/PositionEditor/PositionEditorAdvancedRows.tsx +#: src/components/Synthetics/PositionSeller/PositionSellerAdvancedDisplayRows.tsx msgid "Initial Collateral (Collateral excluding Borrow and Funding Fee)." msgstr "" @@ -3466,15 +3463,15 @@ msgstr "Productos Estructurados" #: src/components/AprInfo/AprInfo.tsx #: src/components/AprInfo/AprInfo.tsx #: src/components/Synthetics/AcceptablePriceImpactInputRow/AcceptablePriceImpactInputRow.tsx -#: src/components/Synthetics/PositionSeller/PositionSeller.tsx -#: src/components/Synthetics/TradeBox/TradeBox.tsx +#: src/components/Synthetics/PositionSeller/PositionSellerAdvancedDisplayRows.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/AdvancedDisplayRows.tsx #: src/pages/LeaderboardPage/components/LeaderboardAccountsTable.tsx #: src/pages/LeaderboardPage/components/LeaderboardPositionsTable.tsx #: src/pages/LeaderboardPage/components/LeaderboardPositionsTable.tsx msgid "NA" msgstr "" -#: src/components/Synthetics/TradeBox/CollateralSelectorRow.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/CollateralSelectorRow.tsx msgid "You have an existing position with {0} as collateral. This action will not apply for that position. <0>Switch to {1} collateral." msgstr "" @@ -3511,10 +3508,6 @@ msgstr "Precio de activación para la orden." #: src/components/Synthetics/Claims/ClaimHistoryRow/ClaimFundingFeesHistoryRow.tsx #: src/components/Synthetics/Claims/ClaimHistoryRow/ClaimFundingFeesHistoryRow.tsx #: src/components/Synthetics/Claims/ClaimsHistory.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/MarketCard/MarketCard.tsx #: src/components/Synthetics/MarketNetFee/MarketNetFee.tsx #: src/components/Synthetics/PositionEditor/PositionEditor.tsx @@ -3587,8 +3580,6 @@ msgstr "" #: src/components/Exchange/PositionsList.js #: src/components/Exchange/PositionsList.js #: src/components/Exchange/SwapBox.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/OrderEditor/OrderEditor.tsx #: src/components/Synthetics/PositionEditor/PositionEditor.tsx #: src/components/Synthetics/PositionItem/PositionItem.tsx @@ -3659,10 +3650,6 @@ msgstr "Opere en GMX y gane <0>$250.000 en premios! Activo hasta el 30 de No msgid "You are leaving GMX.io and will be redirected to a third party, independent website." msgstr "Estas dejando GMX.io y serás redirigido a una página independiente y gestionada por terceras partes." -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -msgid "You have selected {collateralTokenSymbol} as collateral to short {indexTokenSymbol}." -msgstr "" - #: src/components/Synthetics/PositionItem/PositionItem.tsx #: src/components/Synthetics/PositionItem/PositionItem.tsx msgid "Accrued Borrow Fee" @@ -3698,10 +3685,10 @@ msgstr "" msgid "<0>Notifications are provided by Notifi and not affiliated with GMX. By subscribing, you agree that info you provide to Notifi will be governed by its <1>Privacy Policy<2> and <3>Terms of Use." msgstr "" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/GmSwap/GmConfirmationBox/GmConfirmationBox.tsx #: src/components/Synthetics/PositionEditor/PositionEditor.tsx #: src/components/Synthetics/PositionSeller/PositionSeller.tsx +#: src/components/Synthetics/TradeBox/hooks/useTradeWarningsRows.tsx msgid "High Network Fee not yet acknowledged" msgstr "" @@ -3742,11 +3729,6 @@ msgstr "" msgid "UI Fee" msgstr "" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -msgid "Confirm {0} Order" -msgstr "" - #: src/domain/synthetics/orders/simulateExecuteOrderTxn.tsx #: src/domain/synthetics/orders/simulateExecuteOrderTxn.tsx msgid "Execute order simulation failed." @@ -3791,9 +3773,10 @@ msgstr "Documentos" #: src/components/Exchange/ConfirmationBox.js #: src/components/Exchange/PositionSeller.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/PositionEditor/PositionEditor.tsx #: src/components/Synthetics/PositionSeller/PositionSeller.tsx +#: src/components/Synthetics/TradeBox/hooks/useTradeButtonState.tsx +#: src/components/Synthetics/TradeBox/TradeBox.tsx msgid "Creating Order..." msgstr "Creando Order..." @@ -4058,7 +4041,6 @@ msgstr "Reducido" #: src/components/Exchange/OrdersList.js #: src/components/Exchange/TradeHistory.js #: src/components/Exchange/TradeHistory.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/domain/synthetics/orders/utils.tsx #: src/pages/OrdersOverview/OrdersOverview.js msgid "Decrease" @@ -4093,11 +4075,15 @@ msgstr "Dic." msgid "GMX Weekly Updates" msgstr "Actualizaciones semanales de GMX" +#: src/components/Synthetics/TradeBox/hooks/useCollateralInTooltipContent.tsx +msgid "You will be long {indexSymbol} only from your long position." +msgstr "" + #: src/pages/OrdersOverview/OrdersOverview.js msgid "Total active: {openTotal}, executed: {executedTotal}, cancelled: {cancelledTotal}" msgstr "Total activo: {openTotal}, ejecutado: {executedTotal}, cancelado: {cancelledTotal}" -#: src/components/Synthetics/TradeBox/CollateralSelectorRow.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/CollateralSelectorRow.tsx msgid "You have an existing order with {symbol} as collateral. <0>Switch to {symbol} collateral." msgstr "" @@ -4132,7 +4118,7 @@ msgstr "" msgid "Yield simulator for GMX" msgstr "Simulador de rendimientos para GMX" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/AvailableLiquidityRow.tsx msgid "There may not be sufficient liquidity to execute your order when the Min. Receive are met." msgstr "" @@ -4178,9 +4164,9 @@ msgstr "" #: src/components/Exchange/SwapBox.js #: src/components/Exchange/SwapBox.js #: src/components/Exchange/SwapBox.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/MarketCard/MarketCard.tsx #: src/components/Synthetics/SwapCard/SwapCard.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/AvailableLiquidityRow.tsx msgid "Available Liquidity" msgstr "Liquidez Disponible" @@ -4269,12 +4255,9 @@ msgstr "" #: src/components/Exchange/ConfirmationBox.js #: src/components/Exchange/PositionEditor.js #: src/components/Exchange/PositionSeller.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/PositionEditor/PositionEditor.tsx -#: src/components/Synthetics/PositionSeller/PositionSeller.tsx -#: src/components/Synthetics/TradeBox/TradeBox.tsx +#: src/components/Synthetics/PositionEditor/PositionEditorAdvancedRows.tsx +#: src/components/Synthetics/PositionSeller/PositionSellerAdvancedDisplayRows.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/AdvancedDisplayRows.tsx msgid "Collateral ({0})" msgstr "Garantía ({0})" @@ -4286,6 +4269,14 @@ msgstr "" msgid "Order updated!" msgstr "¡Orden actualizada!" +#: src/components/Synthetics/TradeBox/hooks/useCollateralInTooltipContent.tsx +msgid "You will be short {indexSymbol} from your short position, while being long {collateralSymbol} from your {collateralSymbol} collateral. The liquidation price will vary based on the price of {collateralSymbol}." +msgstr "" + +#: src/components/Synthetics/TradeBox/TradeBoxRows/OneClickTrading.tsx +msgid "The previously authorized maximum number of actions has been reached for One-Click Trading." +msgstr "" + #: src/components/Synthetics/CollateralSelector/CollateralSelector.tsx #: src/components/Synthetics/CollateralSelector/CollateralSelector.tsx msgid "Select a pool containing {0} to use it as collateral." @@ -4324,7 +4315,6 @@ msgid "Max Leverage without PnL: 100x" msgstr "" #: src/components/Exchange/ConfirmationBox.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx msgid "Confirm Short" msgstr "Confirma orden a Corto" @@ -4340,10 +4330,6 @@ msgstr "" msgid "Order Type" msgstr "" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -msgid "Decrease size" -msgstr "" - #: src/components/Synthetics/StatusNotification/GmStatusNotification.tsx msgid "Sell order executed" msgstr "" @@ -4360,13 +4346,9 @@ msgstr "" msgid "Affiliate Rewards Claimed" msgstr "" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -msgid "Old Collateral" -msgstr "" - #: src/components/Exchange/ConfirmationBox.js #: src/components/Exchange/PositionSeller.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/SwapSpreadRow.tsx msgid "Spread" msgstr "Deslizamiento" @@ -4402,6 +4384,10 @@ msgstr "Cargando..." msgid "Leaderboard for GMX traders" msgstr "Tabla de clasificación para los traders de GMX" +#: src/components/Synthetics/TradeBox/TradeBoxRows/OneClickTrading.tsx +msgid "There are insufficient funds in your subaccount for One-Click Trading" +msgstr "" + #: src/components/Exchange/PositionsList.js msgid "Share" msgstr "Compartir" @@ -4546,7 +4532,7 @@ msgstr "" msgid "GLP autocompounding vaults" msgstr "" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx +#: src/components/Synthetics/TradeBox/hooks/useTradeButtonState.tsx msgid "TP/SL orders exceed the position" msgstr "" @@ -4575,7 +4561,7 @@ msgstr "Al cerrar la posición, puedes seleccionar en que token deseas recibir l msgid "Top PnL (%)" msgstr "" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/AvailableLiquidityRow.tsx #: src/domain/synthetics/orders/utils.tsx msgid "There may not be sufficient liquidity to execute your order when the price conditions are met." msgstr "" @@ -4774,7 +4760,7 @@ msgstr "" msgid "Begin Transfer" msgstr "Comenzar Transferencia" -#: src/components/SubaccountNavigationButton/SubaccountNavigationButton.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/OneClickTrading.tsx msgid "One-Click Trading is not available for wrapping or unwrapping native token {0}." msgstr "" @@ -4823,7 +4809,7 @@ msgstr "Gobernanza" msgid "Cancel" msgstr "Cancelar" -#: src/components/Synthetics/ConfirmationBox/SideOrderEntries.tsx +#: src/components/Synthetics/TradeBox/components/SideOrderEntries.tsx msgid "Remove Row" msgstr "" @@ -4849,10 +4835,6 @@ msgstr "Orden cancelada." msgid "Buy or Transfer AVAX to Avalanche" msgstr "" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -msgid "You have selected {collateralTokenSymbol} as Collateral, the Liquidation Price will vary based on the price of {collateralTokenSymbol}." -msgstr "" - #: src/pages/Ecosystem/Ecosystem.js msgid "Telegram bot for Open Interest on GMX" msgstr "Bot de Telegram para Interés Abierto en GMX " @@ -4903,7 +4885,7 @@ msgstr "" msgid "Enter new amount or price" msgstr "" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/LimitAndTPSLRows.tsx msgid "Stop-Loss PnL" msgstr "" @@ -5034,7 +5016,7 @@ msgstr "Volumen negociado por sus traders referidos." msgid "Stablecoin Percentage" msgstr "Porcentaje de Stablecoin" -#: src/components/Synthetics/TradeBox/CollateralSelectorRow.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/CollateralSelectorRow.tsx msgid "You have an existing position with {0} as collateral. This Order will not be valid for that Position. <0>Switch to {1} collateral." msgstr "" @@ -5269,6 +5251,10 @@ msgstr "" msgid "Claim esGMX" msgstr "Reclamar esGMX" +#: src/components/Synthetics/TradeBox/TradeBoxRows/OneClickTrading.tsx +msgid "Re-authorize" +msgstr "" + #: src/pages/BuyGMX/BuyGMX.tsx msgid "Buy or Transfer ETH to Arbitrum" msgstr "" @@ -5449,10 +5435,6 @@ msgstr "" msgid "Max Out" msgstr "" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -msgid "The order will only execute if the Min. Receive is met and there is sufficient liquidity." -msgstr "" - #: src/components/Exchange/PositionEditor.js #: src/components/Exchange/PositionSeller.js #: src/components/Exchange/PositionSeller.js @@ -5677,7 +5659,7 @@ msgstr "" msgid "{0} and {1} can be used to buy GM for this market up to the specified buying caps." msgstr "" -#: src/components/SubaccountNavigationButton/SubaccountNavigationButton.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/OneClickTrading.tsx msgid "One-Click Trading is not available using network's native token {0}. Consider using {1} instead." msgstr "" @@ -5755,8 +5737,7 @@ msgstr "" #: src/components/Exchange/ConfirmationBox.js #: src/components/Exchange/ConfirmationBox.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/LimitPriceRow.tsx msgid "Limit Price" msgstr "Precio límite" @@ -5780,6 +5761,7 @@ msgstr "No se pudo ejecutar el depósito en {0} {longOrShortText}" #: src/components/Exchange/PositionEditor.js #: src/components/Exchange/PositionEditor.js #: src/components/Synthetics/PositionEditor/PositionEditor.tsx +#: src/components/Synthetics/PositionEditor/types.ts #: src/components/Synthetics/TradeHistory/keys.ts #: src/pages/Stake/StakeV2.tsx #: src/pages/Stake/StakeV2.tsx @@ -5815,10 +5797,6 @@ msgstr "Activando Apalancamiento..." msgid "There may not be sufficient liquidity to execute the swap to the receive token when the price conditions are met." msgstr "" -#: src/components/SubaccountNavigationButton/SubaccountNavigationButton.tsx -msgid "Enable One-Click Trading" -msgstr "" - #: src/components/NotifyModal/NotifyModal.tsx msgid "Trade Errors" msgstr "" @@ -5842,8 +5820,6 @@ msgstr "" #: src/components/Exchange/SwapBox.js #: src/components/Glp/GlpSwap.js #: src/components/Glp/GlpSwap.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/GmSwap/GmConfirmationBox/GmConfirmationBox.tsx #: src/components/Synthetics/GmSwap/GmConfirmationBox/GmConfirmationBox.tsx #: src/components/Synthetics/GmSwap/GmSwapBox/GmSwapBox.tsx @@ -5911,9 +5887,9 @@ msgstr "" msgid "There are insufficient funds in your Subaccount for One-Click Trading. <0>Click here to top-up." msgstr "" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx +#: src/components/Synthetics/TradeBox/hooks/useTradeboxTransactions.tsx +#: src/components/Synthetics/TradeBox/hooks/useTradeboxTransactions.tsx +#: src/components/Synthetics/TradeBox/hooks/useTradeboxTransactions.tsx msgid "Error submitting order" msgstr "" @@ -6009,10 +5985,6 @@ msgstr "" msgid "Rebates" msgstr "" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -msgid "The spread is > 1%, please ensure the trade details are acceptable before comfirming" -msgstr "" - #: src/components/Glp/GlpSwap.js msgid "Sell failed." msgstr "Venta fallida." @@ -6046,7 +6018,7 @@ msgstr "" msgid "Date" msgstr "Fecha" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx +#: src/components/Synthetics/TradeBox/hooks/useTradeWarningsRows.tsx #: src/domain/synthetics/trade/utils/validation.ts #: src/domain/synthetics/trade/utils/validation.ts #: src/domain/synthetics/trade/utils/validation.ts @@ -6086,7 +6058,6 @@ msgid "Price above Mark Price" msgstr "Precio superior al Precio de Referencia" #: src/components/Exchange/PositionSeller.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/OrderItem/OrderItem.tsx #: src/components/Synthetics/OrderList/OrderList.tsx #: src/components/Synthetics/PositionSeller/PositionSeller.tsx @@ -6167,7 +6138,7 @@ msgstr "" msgid "The amount left in the subaccount is not enough to cover network gas costs." msgstr "" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/LimitAndTPSLRows.tsx msgid "Take-Profit PnL" msgstr "" @@ -6408,10 +6379,6 @@ msgstr "" #: src/components/Synthetics/Claims/ClaimHistoryRow/ClaimFundingFeesHistoryRow.tsx #: src/components/Synthetics/Claims/ClaimHistoryRow/ClaimFundingFeesHistoryRow.tsx #: src/components/Synthetics/Claims/ClaimsHistory.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/MarketCard/MarketCard.tsx #: src/components/Synthetics/MarketNetFee/MarketNetFee.tsx #: src/components/Synthetics/PositionEditor/PositionEditor.tsx @@ -6554,7 +6521,6 @@ msgid "Failed Settlement of Funding Fees" msgstr "" #: src/components/Exchange/ConfirmationBox.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx msgid "Pay Amount" msgstr "Importe a pagar" @@ -6624,7 +6590,7 @@ msgstr "" msgid "{ordersText} cancelled" msgstr "" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx +#: src/components/Synthetics/TradeBox/hooks/useTradeButtonState.tsx msgid "Limit price below Mark Price" msgstr "" @@ -6649,7 +6615,7 @@ msgid "Transaction was cancelled." msgstr "La transacción fue cancelada." #: src/components/Exchange/ConfirmationBox.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx +#: src/components/Synthetics/TradeBox/hooks/useTradeButtonState.tsx msgid "Accept confirmation of trigger orders" msgstr "Acepta la confirmación de las órdenes de activación" @@ -6920,10 +6886,6 @@ msgstr "Tiene una transferencia pendiente de {sender}." msgid "Enter a trigger price" msgstr "" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -msgid "Limit Order Price will vary based on Fees and Price Impact to guarantee the Min. Receive amount." -msgstr "" - #: src/pages/BeginAccountTransfer/BeginAccountTransfer.tsx msgid "Vested GLP not withdrawn" msgstr "GLP adquirido no retirado" @@ -6935,11 +6897,9 @@ msgstr "GLP adquirido no retirado" #: src/components/Exchange/PositionsList.js #: src/components/Exchange/SwapBox.js #: src/components/Exchange/SwapBox.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/PositionEditor/PositionEditor.tsx #: src/components/Synthetics/PositionItem/PositionItem.tsx #: src/components/Synthetics/PositionList/PositionList.tsx -#: src/components/Synthetics/TradeBox/TradeBox.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/EntryPriceRow.tsx #: src/pages/LeaderboardPage/components/LeaderboardPositionsTable.tsx msgid "Entry Price" msgstr "Precio de Entrada" @@ -6962,6 +6922,7 @@ msgstr "" #: src/components/AddressDropdown/AddressDropdown.tsx #: src/components/Synthetics/SubaccountModal/SubaccountModal.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/OneClickTrading.tsx msgid "One-Click Trading" msgstr "" @@ -7025,11 +6986,10 @@ msgid "SELL…" msgstr "" #: src/components/Exchange/ConfirmationBox.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx msgid "Confirm Swap" msgstr "Confirma Intercambio" -#: src/components/Synthetics/PositionSeller/PositionSeller.tsx +#: src/components/Synthetics/PositionSeller/PositionSellerAdvancedDisplayRows.tsx msgid "Keep leverage is not available as Position exceeds max. allowed leverage. <0>Read more." msgstr "" @@ -7093,6 +7053,10 @@ msgstr "" msgid "<0>The APY is an estimate based on the fees collected for the past seven days, extrapolating the current borrowing fee. It excludes:<1><2>price changes of the underlying token(s)<3>traders' PnL, which is expected to be neutral in the long term<4>funding fees, which are exchanged between traders<5><6>Read more about GM token pricing.<7>Check GM pools' performance against other LP Positions in the <8>GMX Dune Dashboard." msgstr "" +#: src/components/Synthetics/TradeBox/TradeBoxRows/OneClickTrading.tsx +msgid "Top-Up" +msgstr "" + #: src/components/Synthetics/MarketCard/MarketCard.tsx msgid "Ask Price (Exit)" msgstr "" @@ -7105,6 +7069,10 @@ msgstr "" msgid "Orders ({ordersCount})" msgstr "" +#: src/components/Synthetics/TradeBox/hooks/useCollateralInTooltipContent.tsx +msgid "You will be long {indexSymbol} from your long position, as well as from your {collateralSymbol} collateral. The liquidation price is higher compared to using a stablecoin as collateral since the worth of the collateral will change with its price." +msgstr "" + #: src/pages/Ecosystem/Ecosystem.js msgid "GMX explorer for stats and traders" msgstr "Explorador de GMX para estadísticas y traders" @@ -7150,7 +7118,7 @@ msgstr "" msgid "Fee values do not include incentives." msgstr "" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx +#: src/components/Synthetics/TradeBox/hooks/useTradeButtonState.tsx msgid "Limit price above Mark Price" msgstr "" @@ -7166,7 +7134,6 @@ msgstr "" #: src/components/Exchange/SwapBox.js #: src/components/Exchange/SwapBox.js #: src/components/Exchange/SwapBox.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/OrderList/filters/OrderTypeFilter.tsx #: src/components/Synthetics/StatusNotification/OrderStatusNotification.tsx #: src/components/Synthetics/SwapCard/SwapCard.tsx @@ -7328,10 +7295,8 @@ msgstr "" #: src/components/Exchange/PositionSeller.js #: src/components/Exchange/PositionsList.js #: src/components/Exchange/PositionsList.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/OrderItem/OrderItem.tsx #: src/components/Synthetics/OrderList/OrderList.tsx -#: src/components/Synthetics/PositionEditor/PositionEditor.tsx #: src/components/Synthetics/PositionItem/PositionItem.tsx #: src/components/Synthetics/PositionList/PositionList.tsx #: src/components/Synthetics/TradeHistory/useDownloadAsCsv.tsx @@ -7438,7 +7403,7 @@ msgid "short" msgstr "" #: src/components/Exchange/ConfirmationBox.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx +#: src/components/Synthetics/TradeBox/hooks/useTriggerOrdersConsent.tsx msgid "I am aware of the trigger orders" msgstr "Soy consciente de las órdenes de activación" @@ -7483,12 +7448,12 @@ msgstr "Precio de ejecución de la orden" #: src/components/Exchange/ConfirmationBox.js #: src/components/Exchange/PositionSeller.js -#: src/components/Synthetics/ConfirmationBox/rows/AllowedSlippageRow.tsx #: src/components/Synthetics/PositionSeller/rows/AllowedSlippageRow.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/AllowedSlippageRow.tsx msgid "Slippage is too high" msgstr "" -#: src/components/Synthetics/ConfirmationBox/SideOrderEntries.tsx +#: src/components/Synthetics/TradeBox/components/SideOrderEntries.tsx msgid "Add Row" msgstr "" @@ -7543,12 +7508,12 @@ msgstr "" #: src/components/Exchange/OrdersList.js #: src/components/Exchange/OrdersList.js #: src/components/Exchange/SwapBox.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/OrderEditor/OrderEditor.tsx #: src/components/Synthetics/OrderItem/OrderItem.tsx #: src/components/Synthetics/OrderList/filters/OrderTypeFilter.tsx #: src/components/Synthetics/PositionItem/PositionItem.tsx #: src/components/Synthetics/TradeBox/TradeBox.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/LimitAndTPSLRows.tsx #: src/components/Synthetics/TradeHistory/keys.ts msgid "Limit" msgstr "Límite" @@ -7571,7 +7536,6 @@ msgid "<0>Insufficient liquidity to execute the order<1>The mark price which msgstr "<0>Liquidez insuficiente para ejecutar la orden<1>El precio de referencia, que es un agregado de precios de mercado, no alcanzó el precio especificado<2>Se alcanzó el precio especificado pero no lo suficiente como para ejecutarlo<3>Ningún guardián recogió la orden para ejecutarla" #: src/components/Exchange/ConfirmationBox.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx msgid "Your position's collateral after deducting fees:" msgstr "La garantía de tu posición después de descontar las comisiones:" @@ -7621,8 +7585,8 @@ msgstr "" msgid "01 Sep 2021" msgstr "01 Sep 2021" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/OrderList/filters/OrderTypeFilter.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/LimitAndTPSLRows.tsx #: src/domain/synthetics/positions/utils.ts msgid "Take-Profit" msgstr "" diff --git a/src/locales/fr/messages.po b/src/locales/fr/messages.po index 60b7b9bb95..d4828580f0 100644 --- a/src/locales/fr/messages.po +++ b/src/locales/fr/messages.po @@ -79,7 +79,6 @@ msgid "Subaccount generation failed" msgstr "" #: src/components/Exchange/ConfirmationBox.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx msgid "{existingTriggerOrderLength, plural, one {You have an active trigger order that might execute immediately after you open this position. Please cancel the order or accept the confirmation to continue.} other {You have # active trigger orders that might execute immediately after you open this position. Please cancel the orders or accept the confirmation to continue.}}" msgstr "{existingTriggerOrderLength, plural, one {Vous avez une commande de déclenchement active qui pourrait être exécutée immédiatement après l'ouverture de cette position. Veuillez annuler la commande ou accepter la confirmation pour continuer.} other {Vous avez # commandes de déclenchement actives qui pourraient être exécutées immédiatement après l'ouverture de cette position. Veuillez annuler les commandes ou accepter la confirmation pour continuer.}}" @@ -155,6 +154,10 @@ msgstr "{0} est au-dessus de son poids cible.<0/><1/>Obtenez une réduction des msgid "Withdrawal error." msgstr "" +#: src/components/Synthetics/TradeBox/TradeBox.tsx +msgid "The execution price will constantly vary based on fees and price impact to guarantee that you receive the minimum receive amount." +msgstr "" + #: src/pages/Home/Home.js msgid "Decentralized<0/>Perpetual Exchange" msgstr "Décentralisé <0/>Bourse perpétuelle" @@ -236,7 +239,6 @@ msgstr "" #: src/components/Glp/GlpSwap.js #: src/components/Glp/GlpSwap.js #: src/components/Glp/GlpSwap.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/OrderEditor/OrderEditor.tsx #: src/components/Synthetics/TradeFeesRow/TradeFeesRow.tsx msgid "Fees" @@ -403,8 +405,6 @@ msgid "Insufficient liquidity in the {0} market pool. Select a different pool fo msgstr "" #: src/components/Exchange/ConfirmationBox.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx msgid "Confirm Limit Order" msgstr "" @@ -515,6 +515,7 @@ msgstr "" msgid "Incentives are airdropped weekly." msgstr "" +#: src/components/Synthetics/AcceptablePriceImpactInputRow/AcceptablePriceImpactInputRow.tsx #: src/components/Synthetics/AcceptablePriceImpactInputRow/AcceptablePriceImpactInputRow.tsx msgid "Acceptable Price Impact" msgstr "" @@ -527,10 +528,6 @@ msgstr "Ajouter à Metamask" msgid "Insufficient staked tokens" msgstr "" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -msgid "New Collateral" -msgstr "" - #: src/lib/wallets/connecters/binanceW3W/binanceWallet.ts msgid "Tap [Create Wallet] to start using your Web3 Wallet." msgstr "Appuyez sur [Créer un portefeuille] pour commencer à utiliser votre portefeuille Web3." @@ -721,8 +718,6 @@ msgstr "" #: src/components/Exchange/SwapBox.js #: src/components/Glp/GlpSwap.js #: src/components/Glp/GlpSwap.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/GmSwap/GmConfirmationBox/GmConfirmationBox.tsx #: src/components/Synthetics/GmSwap/GmConfirmationBox/GmConfirmationBox.tsx #: src/components/Synthetics/GmSwap/GmSwapBox/GmSwapBox.tsx @@ -747,8 +742,8 @@ msgstr "Page de gouvernance GMX" msgid "Decentralized Money Market" msgstr "" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/OrderList/filters/OrderTypeFilter.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/LimitAndTPSLRows.tsx #: src/domain/synthetics/positions/utils.ts msgid "Stop-Loss" msgstr "" @@ -774,10 +769,6 @@ msgstr "{0} GLP ont été réservés pour le vesting." msgid "Buy with {0}" msgstr "Acheter avec {0}" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -msgid "You have an existing position with {0} as collateral. This Order will not be valid for that Position." -msgstr "Vous avez une position existante avec {0} comme collatéral. Cet ordre ne sera pas valide pour cette position." - #: src/components/Referrals/JoinReferralCode.js msgid "Adding..." msgstr "S'ajoute..." @@ -891,8 +882,8 @@ msgid "Unstake completed!" msgstr "" #: src/components/Exchange/ConfirmationBox.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/OrderEditor/OrderEditor.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/MinReceiveRow.tsx msgid "Min. Receive" msgstr "Reçu Min." @@ -931,8 +922,6 @@ msgstr "" #: src/components/Exchange/OrdersList.js #: src/components/Exchange/PositionsList.js #: src/components/Exchange/PositionsList.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/MarketStats/MarketStats.tsx #: src/components/Synthetics/OrderItem/OrderItem.tsx #: src/components/Synthetics/PositionItem/PositionItem.tsx @@ -1191,8 +1180,7 @@ msgstr "Bot telegram pour les mises à jour des positions sur GMX" msgid "account" msgstr "compte" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/TradeBox/TradeBox.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/AdvancedDisplayRows.tsx msgid "Keep leverage at {0}" msgstr "" @@ -1299,6 +1287,10 @@ msgstr "" msgid "Select Positions" msgstr "" +#: src/components/Synthetics/TradeBox/hooks/useCollateralInTooltipContent.tsx +msgid "You will be long {indexSymbol} from your long position, while being long {collateralSymbol} from your {collateralSymbol} collateral. The liquidation price will vary based on the price of {collateralSymbol}." +msgstr "" + #: src/components/Referrals/AffiliatesStats.tsx #: src/components/Referrals/AffiliatesStats.tsx #: src/components/Referrals/TradersStats.tsx @@ -1552,7 +1544,7 @@ msgstr "" msgid "Mark" msgstr "" -#: src/components/Synthetics/PositionSeller/PositionSeller.tsx +#: src/components/Synthetics/PositionSeller/PositionSellerAdvancedDisplayRows.tsx msgid "Keep leverage at {keepLeverageAtValue}" msgstr "" @@ -1708,7 +1700,7 @@ msgstr "Vérification du code..." msgid "GM Pools" msgstr "" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/AvailableLiquidityRow.tsx msgid "The order will only execute if the price conditions are met and there is sufficient liquidity." msgstr "" @@ -1747,16 +1739,14 @@ msgstr "" #: src/components/Exchange/PositionsList.js #: src/components/Synthetics/Claims/ClaimsHistory.tsx #: src/components/Synthetics/Claims/ClaimsHistory.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/OrderEditor/OrderEditor.tsx #: src/components/Synthetics/OrderItem/OrderItem.tsx #: src/components/Synthetics/OrderList/OrderList.tsx -#: src/components/Synthetics/PositionEditor/PositionEditor.tsx +#: src/components/Synthetics/PositionEditor/PositionEditorAdvancedRows.tsx #: src/components/Synthetics/PositionItem/PositionItem.tsx #: src/components/Synthetics/PositionList/PositionList.tsx -#: src/components/Synthetics/PositionSeller/PositionSeller.tsx -#: src/components/Synthetics/TradeBox/TradeBox.tsx +#: src/components/Synthetics/PositionSeller/PositionSellerAdvancedDisplayRows.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/AdvancedDisplayRows.tsx #: src/components/Synthetics/TradeHistory/TradeHistory.tsx #: src/components/Synthetics/TradeHistory/useDownloadAsCsv.tsx #: src/pages/LeaderboardPage/components/LeaderboardPositionsTable.tsx @@ -1894,6 +1884,11 @@ msgstr "" msgid "{0} Approved!" msgstr "{0} Approuvé!" +#: src/components/Synthetics/PositionEditor/PositionEditorAdvancedRows.tsx +#: src/components/Synthetics/PositionSeller/PositionSellerAdvancedDisplayRows.tsx +msgid "Advanced display" +msgstr "" + #: src/components/Exchange/SwapBox.js msgid "Long {0}" msgstr "Long {0}" @@ -1917,7 +1912,7 @@ msgid "Total Trading Volume" msgstr "Volume total des échanges" #: src/components/Exchange/ConfirmationBox.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/CollateralSpreadRow.tsx msgid "Collateral Spread" msgstr "" @@ -2001,10 +1996,6 @@ msgstr "" msgid "Allow {0} to be spent" msgstr "" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -msgid "You have an existing position with {0} as collateral. This action will not apply for that position." -msgstr "Vous avez une position existante avec {0} comme collatéral. Cette action ne s'appliquera pas à cette position." - #: src/components/Exchange/SwapBox.js msgid "Swap Order created!" msgstr "Ordre d'échange créé !" @@ -2053,7 +2044,7 @@ msgstr "" msgid "{existingTriggerOrderLength, plural, one {You have an active trigger order that could impact this position.} other {You have # active trigger orders that could impact this position.}}" msgstr "{existingTriggerOrderLength, plural, one {Vous avez une commande de déclenchement active qui pourrait affecter cette position.} other {Vous avez # commandes de déclenchement actives qui pourraient affecter cette position.}}" -#: src/components/SubaccountNavigationButton/SubaccountNavigationButton.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/OneClickTrading.tsx msgid "Reduce wallet signing popups with One-Click Trading. This option is also available through the Wallet menu in the top right. <0>Read more." msgstr "Réduisez les popups de signature de portefeuille avec le trading en un clic. Cette option est également disponible via le menu du portefeuille en haut à droite. <0>En savoir plus." @@ -2069,7 +2060,6 @@ msgstr "" msgid "Swap {0} USDG for{1} {2}" msgstr "" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/OrderItem/OrderItem.tsx msgid "{0} will be swapped to {1} on order execution." msgstr "" @@ -2127,8 +2117,6 @@ msgstr "" #: src/components/Exchange/ConfirmationBox.js #: src/components/Exchange/SwapBox.js #: src/components/Exchange/SwapBox.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/SwapCard/SwapCard.tsx #: src/components/Synthetics/SwapCard/SwapCard.tsx msgid "{0} Price" @@ -2237,6 +2225,10 @@ msgstr "Prix inférieur à celui de la marque" msgid "APRs are updated weekly on Wednesday and will depend on the fees collected for the week." msgstr "Les taux de rendement annuels sont mis à jour chaque semaine le mercredi et dépendront des frais perçus pour la semaine." +#: src/components/Synthetics/TradeBox/TradeBoxRows/AdvancedDisplayRows.tsx +msgid "Advanced Display" +msgstr "" + #: src/components/Synthetics/SubaccountModal/utils.ts msgid "Generate & Activate Subaccount" msgstr "" @@ -2294,7 +2286,6 @@ msgid "Couldn't find a swap route with enough liquidity" msgstr "" #: src/components/Exchange/ConfirmationBox.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx msgid "Confirm Long" msgstr "Confirmer le long" @@ -2345,6 +2336,10 @@ msgstr "Somme disponible pour retirer de GLP. Montant non utilisé par les poste msgid "Invalid price, see warning" msgstr "Prix invalide, voir l'avertissement" +#: src/components/Synthetics/TradeBox/hooks/useCollateralInTooltipContent.tsx +msgid "You will be short {indexSymbol} only from your short position." +msgstr "" + #: src/pages/Actions/ActionsV1/ActionsV1.tsx msgid "GMX V1 {networkName} actions for all accounts." msgstr "" @@ -2361,6 +2356,10 @@ msgstr "" msgid "You need to select {swapTokenSymbol} as the \"Pay\" token to use it for collateral to initiate this trade." msgstr "Vous devez sélectionner {swapTokenSymbol} comme token \"Payer\" pour l'utiliser comme collatéral pour initier cette transaction." +#: src/components/Synthetics/TradeBox/TradeBoxRows/LimitAndTPSLRows.tsx +msgid "There are issues in the TP/SL orders." +msgstr "" + #: src/components/Glp/GlpSwap.js msgid "The Bonus Rebate is an estimate and will be airdropped as ARB tokens when migrating this liquidity to GM pools within the same epoch. <0>Read more." msgstr "" @@ -2398,9 +2397,12 @@ msgstr "Montant actuel du pool" msgid "Cancel failed." msgstr "Annulation échouée" +#: src/components/Synthetics/TradeBox/TradeBoxRows/AvailableLiquidityRow.tsx +msgid "The order will be executed if there is sufficient liquidity and the execution price guarantees that you will receive the minimum receive amount." +msgstr "" + #: src/components/Exchange/ConfirmationBox.js #: src/components/Exchange/PositionSeller.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx msgid "Transacting with a depegged stable coin is subject to spreads reflecting the worse of current market price or $1.00, with transactions involving multiple stablecoins may have multiple spreads." msgstr "" @@ -2445,10 +2447,6 @@ msgstr "Sélectionner le marché" msgid "Open positions: {0}<0/>Under risk: {1}" msgstr "Positions ouvertes: {0}<0/>Sous risque: {1}" -#: src/components/SubaccountNavigationButton/SubaccountNavigationButton.tsx -msgid "There are insufficient funds in your Subaccount for One-Click Trading. Click here to top-up." -msgstr "" - #: src/components/Exchange/UsefulLinks.tsx msgid "Speed up page loading" msgstr "Accélérer le chargement de la page" @@ -2517,10 +2515,6 @@ msgstr "Echanger" msgid "Adding referral code failed." msgstr "L'ajout du code/ID de référence a échoué." -#: src/components/SubaccountNavigationButton/SubaccountNavigationButton.tsx -msgid "The previously authorized maximum number of Actions has been reached for One-Click Trading. Click here to re-authorize." -msgstr "" - #: src/components/Exchange/PositionEditor.js msgid "Max leverage without PnL: {0}x" msgstr "" @@ -2680,13 +2674,12 @@ msgstr "" #: src/components/Exchange/PositionSeller.js #: src/components/Exchange/SwapBox.js #: src/components/Exchange/SwapBox.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/OrderEditor/OrderEditor.tsx -#: src/components/Synthetics/PositionEditor/PositionEditor.tsx -#: src/components/Synthetics/PositionSeller/PositionSeller.tsx -#: src/components/Synthetics/TradeBox/TradeBox.tsx -#: src/components/Synthetics/TradeBox/TradeBox.tsx +#: src/components/Synthetics/PositionEditor/PositionEditorAdvancedRows.tsx +#: src/components/Synthetics/PositionSeller/PositionSellerAdvancedDisplayRows.tsx #: src/components/Synthetics/TradeBox/TradeBox.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/AdvancedDisplayRows.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/AdvancedDisplayRows.tsx msgid "Leverage" msgstr "Levier" @@ -2791,10 +2784,6 @@ msgstr "" msgid "Claim failed." msgstr "Réclamation échouée." -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -msgid "You have selected {collateralTokenSymbol} as collateral; the liquidation price is higher compared to using a stablecoin as collateral since the worth of the collateral will change with its price. If required and available, you can change the collateral type using the \"Collateral In\" option in the trade box." -msgstr "" - #: src/components/Synthetics/Claims/SettleAccruedCard.tsx msgid "Accrued Price Impact Rebates. They will become Claimable after some time.<0/><1/><2>Read more." msgstr "" @@ -2861,10 +2850,6 @@ msgstr "" msgid "GM can be sold for {0} and {1} for this market up to the specified selling caps. The remaining tokens in the pool are reserved for currently open positions." msgstr "" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -msgid "Collateral value may differ due to different Price Impact at the time of execution." -msgstr "" - #: src/components/Synthetics/ExecutionPriceRow.tsx #: src/components/Synthetics/TradeHistory/TradeHistoryRow/utils/position.ts #: src/components/Synthetics/TradeHistory/TradeHistoryRow/utils/position.ts @@ -2967,6 +2952,10 @@ msgstr "Vester avec GMX sur Arbitrum" msgid "{longOrShort} positions {fundingAction} a funding fee of {fundingRate} per hour and {borrowAction} a borrow fee of {borrowRate} per hour." msgstr "" +#: src/components/Synthetics/TradeBox/TradeBoxRows/LimitAndTPSLRows.tsx +msgid "Limit / TP / SL" +msgstr "" + #: src/components/Exchange/OrderEditor.js #: src/components/Synthetics/OrderEditor/OrderEditor.tsx msgid "Updating Order..." @@ -3029,8 +3018,8 @@ msgstr "Pas encore d'échanges" #: src/components/Exchange/ConfirmationBox.js #: src/components/Exchange/PositionSeller.js #: src/components/SettingsModal/SettingsModal.tsx -#: src/components/Synthetics/ConfirmationBox/rows/AllowedSlippageRow.tsx #: src/components/Synthetics/PositionSeller/rows/AllowedSlippageRow.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/AllowedSlippageRow.tsx msgid "Allowed Slippage" msgstr "Glissement autorisé" @@ -3147,12 +3136,11 @@ msgstr "Échange soumis." #: src/components/Exchange/PositionSeller.js #: src/components/Exchange/PositionsList.js #: src/components/Exchange/TradeHistory.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/PositionItem/PositionItem.tsx #: src/components/Synthetics/PositionItem/PositionItem.tsx -#: src/components/Synthetics/PositionSeller/PositionSeller.tsx -#: src/components/Synthetics/PositionSeller/PositionSeller.tsx -#: src/components/Synthetics/TradeBox/TradeBox.tsx +#: src/components/Synthetics/PositionSeller/PositionSellerAdvancedDisplayRows.tsx +#: src/components/Synthetics/PositionSeller/PositionSellerAdvancedDisplayRows.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/AdvancedDisplayRows.tsx #: src/components/Synthetics/TradeHistory/TradeHistoryRow/utils/position.ts #: src/pages/AccountDashboard/DailyAndCumulativePnL.tsx #: src/pages/Actions/ActionsV1/ActionsV1.tsx @@ -3176,6 +3164,7 @@ msgstr "" #: src/components/Exchange/PositionEditor.js #: src/components/Exchange/PositionEditor.js #: src/components/Synthetics/PositionEditor/PositionEditor.tsx +#: src/components/Synthetics/PositionEditor/types.ts #: src/components/Synthetics/SubaccountModal/SubaccountModal.tsx #: src/components/Synthetics/TradeHistory/keys.ts #: src/pages/Stake/StakeV2.tsx @@ -3261,8 +3250,8 @@ msgstr "La position sera ouverte à {0} USD avec un glissement max. de {1}%.<0/> msgid "Active Referral Code" msgstr "Code/ID de référence actif" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/PositionEditor/PositionEditor.tsx +#: src/components/Synthetics/TradeBox/hooks/useTradeWarningsRows.tsx msgid "Pending {0} approval" msgstr "" @@ -3274,6 +3263,10 @@ msgstr "Veuillez changer votre réseau vers Arbitrum." msgid "The position would be immediately liquidated upon order execution. Try reducing the size." msgstr "" +#: src/components/Synthetics/TradeBox/TradeBoxRows/OneClickTrading.tsx +msgid "Enable" +msgstr "" + #: src/components/Synthetics/GmList/GmList.tsx #: src/components/Synthetics/MarketTokenSelector/MarketTokenSelector.tsx msgid "BUYABLE" @@ -3305,6 +3298,10 @@ msgstr "" msgid "You have yet to reach the minimum \"Capital Used\" of {0} to qualify for the rankings." msgstr "" +#: src/components/Synthetics/TradeBox/TradeBoxRows/LimitPriceRow.tsx +msgid "The execution price for the limit order updates in real-time on the orders tab after order creation to guarantee that you receive the minimum receive amount." +msgstr "" + #: src/components/Exchange/SwapBox.js msgid "Swap amount exceeds Available Liquidity." msgstr "" @@ -3326,8 +3323,8 @@ msgstr "Préc" msgid "Unknown buy GM order" msgstr "" -#: src/components/Synthetics/ConfirmationBox/rows/AllowedSlippageRow.tsx #: src/components/Synthetics/PositionSeller/rows/AllowedSlippageRow.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/AllowedSlippageRow.tsx msgid "You can edit the default Allowed Slippage in the settings menu on the top right of the page.<0/><1/>Note that a low allowed slippage, e.g. less than -{0}, may result in failed orders if prices are volatile." msgstr "" @@ -3363,7 +3360,7 @@ msgstr "Gagner" #: src/components/Exchange/SwapBox.js #: src/components/Synthetics/CollateralSelector/CollateralSelector.tsx #: src/components/Synthetics/CollateralSelector/CollateralSelector.tsx -#: src/components/Synthetics/TradeBox/CollateralSelectorRow.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/CollateralSelectorRow.tsx msgid "Collateral In" msgstr "Collatéral En" @@ -3383,8 +3380,8 @@ msgstr "Guide d'opérations" msgid "TRADING Airdrop" msgstr "" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -msgid "Limit Order Price to guarantee Min. Receive amount is updated in real time in the Orders tab after the order has been created." +#: src/components/Synthetics/TradeBox/hooks/useCollateralInTooltipContent.tsx +msgid "You will be short {indexSymbol} from your short position, while being long {collateralSymbol} from your {collateralSymbol} collateral. This can be useful for delta-neutral strategies to earn funding fees." msgstr "" #: src/components/Referrals/TradersStats.tsx @@ -3445,8 +3442,8 @@ msgstr "" msgid "The Execution Price didn't meet the Acceptable Price condition. The Order will get filled when the condition is met." msgstr "Le prix d'exécution n'a pas respecté la condition de prix acceptable. L'ordre sera exécuté lorsque la condition sera remplie." -#: src/components/Synthetics/PositionEditor/PositionEditor.tsx -#: src/components/Synthetics/PositionSeller/PositionSeller.tsx +#: src/components/Synthetics/PositionEditor/PositionEditorAdvancedRows.tsx +#: src/components/Synthetics/PositionSeller/PositionSellerAdvancedDisplayRows.tsx msgid "Initial Collateral (Collateral excluding Borrow and Funding Fee)." msgstr "" @@ -3466,15 +3463,15 @@ msgstr "Produits structurés" #: src/components/AprInfo/AprInfo.tsx #: src/components/AprInfo/AprInfo.tsx #: src/components/Synthetics/AcceptablePriceImpactInputRow/AcceptablePriceImpactInputRow.tsx -#: src/components/Synthetics/PositionSeller/PositionSeller.tsx -#: src/components/Synthetics/TradeBox/TradeBox.tsx +#: src/components/Synthetics/PositionSeller/PositionSellerAdvancedDisplayRows.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/AdvancedDisplayRows.tsx #: src/pages/LeaderboardPage/components/LeaderboardAccountsTable.tsx #: src/pages/LeaderboardPage/components/LeaderboardPositionsTable.tsx #: src/pages/LeaderboardPage/components/LeaderboardPositionsTable.tsx msgid "NA" msgstr "" -#: src/components/Synthetics/TradeBox/CollateralSelectorRow.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/CollateralSelectorRow.tsx msgid "You have an existing position with {0} as collateral. This action will not apply for that position. <0>Switch to {1} collateral." msgstr "" @@ -3511,10 +3508,6 @@ msgstr "Prix de déclenchement pour l'ordre." #: src/components/Synthetics/Claims/ClaimHistoryRow/ClaimFundingFeesHistoryRow.tsx #: src/components/Synthetics/Claims/ClaimHistoryRow/ClaimFundingFeesHistoryRow.tsx #: src/components/Synthetics/Claims/ClaimsHistory.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/MarketCard/MarketCard.tsx #: src/components/Synthetics/MarketNetFee/MarketNetFee.tsx #: src/components/Synthetics/PositionEditor/PositionEditor.tsx @@ -3587,8 +3580,6 @@ msgstr "" #: src/components/Exchange/PositionsList.js #: src/components/Exchange/PositionsList.js #: src/components/Exchange/SwapBox.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/OrderEditor/OrderEditor.tsx #: src/components/Synthetics/PositionEditor/PositionEditor.tsx #: src/components/Synthetics/PositionItem/PositionItem.tsx @@ -3659,10 +3650,6 @@ msgstr "Échanger sur GMX et gagner <0>$250.000 de prix ! Jusqu'au 30 novemb msgid "You are leaving GMX.io and will be redirected to a third party, independent website." msgstr "Vous quittez GMX.io et serez redirigé vers un site Web tiers et indépendant." -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -msgid "You have selected {collateralTokenSymbol} as collateral to short {indexTokenSymbol}." -msgstr "" - #: src/components/Synthetics/PositionItem/PositionItem.tsx #: src/components/Synthetics/PositionItem/PositionItem.tsx msgid "Accrued Borrow Fee" @@ -3698,10 +3685,10 @@ msgstr "" msgid "<0>Notifications are provided by Notifi and not affiliated with GMX. By subscribing, you agree that info you provide to Notifi will be governed by its <1>Privacy Policy<2> and <3>Terms of Use." msgstr "" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/GmSwap/GmConfirmationBox/GmConfirmationBox.tsx #: src/components/Synthetics/PositionEditor/PositionEditor.tsx #: src/components/Synthetics/PositionSeller/PositionSeller.tsx +#: src/components/Synthetics/TradeBox/hooks/useTradeWarningsRows.tsx msgid "High Network Fee not yet acknowledged" msgstr "" @@ -3742,11 +3729,6 @@ msgstr "" msgid "UI Fee" msgstr "" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -msgid "Confirm {0} Order" -msgstr "" - #: src/domain/synthetics/orders/simulateExecuteOrderTxn.tsx #: src/domain/synthetics/orders/simulateExecuteOrderTxn.tsx msgid "Execute order simulation failed." @@ -3791,9 +3773,10 @@ msgstr "Documents" #: src/components/Exchange/ConfirmationBox.js #: src/components/Exchange/PositionSeller.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/PositionEditor/PositionEditor.tsx #: src/components/Synthetics/PositionSeller/PositionSeller.tsx +#: src/components/Synthetics/TradeBox/hooks/useTradeButtonState.tsx +#: src/components/Synthetics/TradeBox/TradeBox.tsx msgid "Creating Order..." msgstr "Création de l'ordre..." @@ -4058,7 +4041,6 @@ msgstr "Diminué" #: src/components/Exchange/OrdersList.js #: src/components/Exchange/TradeHistory.js #: src/components/Exchange/TradeHistory.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/domain/synthetics/orders/utils.tsx #: src/pages/OrdersOverview/OrdersOverview.js msgid "Decrease" @@ -4093,11 +4075,15 @@ msgstr "Dec." msgid "GMX Weekly Updates" msgstr "Mises à jour hebdomadaires GMX" +#: src/components/Synthetics/TradeBox/hooks/useCollateralInTooltipContent.tsx +msgid "You will be long {indexSymbol} only from your long position." +msgstr "" + #: src/pages/OrdersOverview/OrdersOverview.js msgid "Total active: {openTotal}, executed: {executedTotal}, cancelled: {cancelledTotal}" msgstr "Actif total: {openTotal}, exécuté: {executedTotal}, annulé: {cancelledTotal}" -#: src/components/Synthetics/TradeBox/CollateralSelectorRow.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/CollateralSelectorRow.tsx msgid "You have an existing order with {symbol} as collateral. <0>Switch to {symbol} collateral." msgstr "" @@ -4132,7 +4118,7 @@ msgstr "" msgid "Yield simulator for GMX" msgstr "Simulateur de rendement GMX" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/AvailableLiquidityRow.tsx msgid "There may not be sufficient liquidity to execute your order when the Min. Receive are met." msgstr "" @@ -4178,9 +4164,9 @@ msgstr "" #: src/components/Exchange/SwapBox.js #: src/components/Exchange/SwapBox.js #: src/components/Exchange/SwapBox.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/MarketCard/MarketCard.tsx #: src/components/Synthetics/SwapCard/SwapCard.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/AvailableLiquidityRow.tsx msgid "Available Liquidity" msgstr "Liquidité Disponible" @@ -4269,12 +4255,9 @@ msgstr "" #: src/components/Exchange/ConfirmationBox.js #: src/components/Exchange/PositionEditor.js #: src/components/Exchange/PositionSeller.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/PositionEditor/PositionEditor.tsx -#: src/components/Synthetics/PositionSeller/PositionSeller.tsx -#: src/components/Synthetics/TradeBox/TradeBox.tsx +#: src/components/Synthetics/PositionEditor/PositionEditorAdvancedRows.tsx +#: src/components/Synthetics/PositionSeller/PositionSellerAdvancedDisplayRows.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/AdvancedDisplayRows.tsx msgid "Collateral ({0})" msgstr "Collatéral ({0})" @@ -4286,6 +4269,14 @@ msgstr "" msgid "Order updated!" msgstr "Ordre actualisé !" +#: src/components/Synthetics/TradeBox/hooks/useCollateralInTooltipContent.tsx +msgid "You will be short {indexSymbol} from your short position, while being long {collateralSymbol} from your {collateralSymbol} collateral. The liquidation price will vary based on the price of {collateralSymbol}." +msgstr "" + +#: src/components/Synthetics/TradeBox/TradeBoxRows/OneClickTrading.tsx +msgid "The previously authorized maximum number of actions has been reached for One-Click Trading." +msgstr "" + #: src/components/Synthetics/CollateralSelector/CollateralSelector.tsx #: src/components/Synthetics/CollateralSelector/CollateralSelector.tsx msgid "Select a pool containing {0} to use it as collateral." @@ -4324,7 +4315,6 @@ msgid "Max Leverage without PnL: 100x" msgstr "" #: src/components/Exchange/ConfirmationBox.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx msgid "Confirm Short" msgstr "Confirmer le Short" @@ -4340,10 +4330,6 @@ msgstr "" msgid "Order Type" msgstr "" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -msgid "Decrease size" -msgstr "" - #: src/components/Synthetics/StatusNotification/GmStatusNotification.tsx msgid "Sell order executed" msgstr "" @@ -4360,13 +4346,9 @@ msgstr "" msgid "Affiliate Rewards Claimed" msgstr "" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -msgid "Old Collateral" -msgstr "" - #: src/components/Exchange/ConfirmationBox.js #: src/components/Exchange/PositionSeller.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/SwapSpreadRow.tsx msgid "Spread" msgstr "Marge" @@ -4402,6 +4384,10 @@ msgstr "Chargement..." msgid "Leaderboard for GMX traders" msgstr "Tableau d'affichage pour les traders GMX" +#: src/components/Synthetics/TradeBox/TradeBoxRows/OneClickTrading.tsx +msgid "There are insufficient funds in your subaccount for One-Click Trading" +msgstr "" + #: src/components/Exchange/PositionsList.js msgid "Share" msgstr "Partager" @@ -4546,7 +4532,7 @@ msgstr "" msgid "GLP autocompounding vaults" msgstr "" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx +#: src/components/Synthetics/TradeBox/hooks/useTradeButtonState.tsx msgid "TP/SL orders exceed the position" msgstr "" @@ -4575,7 +4561,7 @@ msgstr "Lors de la clôture de la position, vous pouvez sélectionner le token a msgid "Top PnL (%)" msgstr "" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/AvailableLiquidityRow.tsx #: src/domain/synthetics/orders/utils.tsx msgid "There may not be sufficient liquidity to execute your order when the price conditions are met." msgstr "" @@ -4774,7 +4760,7 @@ msgstr "" msgid "Begin Transfer" msgstr "Commencer le transfert" -#: src/components/SubaccountNavigationButton/SubaccountNavigationButton.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/OneClickTrading.tsx msgid "One-Click Trading is not available for wrapping or unwrapping native token {0}." msgstr "" @@ -4823,7 +4809,7 @@ msgstr "Gouvernance" msgid "Cancel" msgstr "Annuler" -#: src/components/Synthetics/ConfirmationBox/SideOrderEntries.tsx +#: src/components/Synthetics/TradeBox/components/SideOrderEntries.tsx msgid "Remove Row" msgstr "" @@ -4849,10 +4835,6 @@ msgstr "Ordre annulé." msgid "Buy or Transfer AVAX to Avalanche" msgstr "" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -msgid "You have selected {collateralTokenSymbol} as Collateral, the Liquidation Price will vary based on the price of {collateralTokenSymbol}." -msgstr "" - #: src/pages/Ecosystem/Ecosystem.js msgid "Telegram bot for Open Interest on GMX" msgstr "Bot Telegram pour l'intérêt ouvert sur GMX" @@ -4903,7 +4885,7 @@ msgstr "" msgid "Enter new amount or price" msgstr "" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/LimitAndTPSLRows.tsx msgid "Stop-Loss PnL" msgstr "" @@ -5034,7 +5016,7 @@ msgstr "Volume échangé par vos traders parrainés." msgid "Stablecoin Percentage" msgstr "Pourcentage de stablecoins" -#: src/components/Synthetics/TradeBox/CollateralSelectorRow.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/CollateralSelectorRow.tsx msgid "You have an existing position with {0} as collateral. This Order will not be valid for that Position. <0>Switch to {1} collateral." msgstr "" @@ -5269,6 +5251,10 @@ msgstr "" msgid "Claim esGMX" msgstr "Réclamer esGMX" +#: src/components/Synthetics/TradeBox/TradeBoxRows/OneClickTrading.tsx +msgid "Re-authorize" +msgstr "" + #: src/pages/BuyGMX/BuyGMX.tsx msgid "Buy or Transfer ETH to Arbitrum" msgstr "" @@ -5449,10 +5435,6 @@ msgstr "" msgid "Max Out" msgstr "" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -msgid "The order will only execute if the Min. Receive is met and there is sufficient liquidity." -msgstr "" - #: src/components/Exchange/PositionEditor.js #: src/components/Exchange/PositionSeller.js #: src/components/Exchange/PositionSeller.js @@ -5677,7 +5659,7 @@ msgstr "" msgid "{0} and {1} can be used to buy GM for this market up to the specified buying caps." msgstr "" -#: src/components/SubaccountNavigationButton/SubaccountNavigationButton.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/OneClickTrading.tsx msgid "One-Click Trading is not available using network's native token {0}. Consider using {1} instead." msgstr "" @@ -5755,8 +5737,7 @@ msgstr "" #: src/components/Exchange/ConfirmationBox.js #: src/components/Exchange/ConfirmationBox.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/LimitPriceRow.tsx msgid "Limit Price" msgstr "Prix de limite" @@ -5780,6 +5761,7 @@ msgstr "Impossible d'exécuter ce dépôt dans {0} {longOrShortText}" #: src/components/Exchange/PositionEditor.js #: src/components/Exchange/PositionEditor.js #: src/components/Synthetics/PositionEditor/PositionEditor.tsx +#: src/components/Synthetics/PositionEditor/types.ts #: src/components/Synthetics/TradeHistory/keys.ts #: src/pages/Stake/StakeV2.tsx #: src/pages/Stake/StakeV2.tsx @@ -5815,10 +5797,6 @@ msgstr "Permettre l'effet de levier..." msgid "There may not be sufficient liquidity to execute the swap to the receive token when the price conditions are met." msgstr "" -#: src/components/SubaccountNavigationButton/SubaccountNavigationButton.tsx -msgid "Enable One-Click Trading" -msgstr "" - #: src/components/NotifyModal/NotifyModal.tsx msgid "Trade Errors" msgstr "" @@ -5842,8 +5820,6 @@ msgstr "" #: src/components/Exchange/SwapBox.js #: src/components/Glp/GlpSwap.js #: src/components/Glp/GlpSwap.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/GmSwap/GmConfirmationBox/GmConfirmationBox.tsx #: src/components/Synthetics/GmSwap/GmConfirmationBox/GmConfirmationBox.tsx #: src/components/Synthetics/GmSwap/GmSwapBox/GmSwapBox.tsx @@ -5911,9 +5887,9 @@ msgstr "" msgid "There are insufficient funds in your Subaccount for One-Click Trading. <0>Click here to top-up." msgstr "" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx +#: src/components/Synthetics/TradeBox/hooks/useTradeboxTransactions.tsx +#: src/components/Synthetics/TradeBox/hooks/useTradeboxTransactions.tsx +#: src/components/Synthetics/TradeBox/hooks/useTradeboxTransactions.tsx msgid "Error submitting order" msgstr "" @@ -6009,10 +5985,6 @@ msgstr "" msgid "Rebates" msgstr "" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -msgid "The spread is > 1%, please ensure the trade details are acceptable before comfirming" -msgstr "" - #: src/components/Glp/GlpSwap.js msgid "Sell failed." msgstr "Vente échouée." @@ -6046,7 +6018,7 @@ msgstr "" msgid "Date" msgstr "Date" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx +#: src/components/Synthetics/TradeBox/hooks/useTradeWarningsRows.tsx #: src/domain/synthetics/trade/utils/validation.ts #: src/domain/synthetics/trade/utils/validation.ts #: src/domain/synthetics/trade/utils/validation.ts @@ -6086,7 +6058,6 @@ msgid "Price above Mark Price" msgstr "Prix supérieur à celui de la marque" #: src/components/Exchange/PositionSeller.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/OrderItem/OrderItem.tsx #: src/components/Synthetics/OrderList/OrderList.tsx #: src/components/Synthetics/PositionSeller/PositionSeller.tsx @@ -6167,7 +6138,7 @@ msgstr "" msgid "The amount left in the subaccount is not enough to cover network gas costs." msgstr "" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/LimitAndTPSLRows.tsx msgid "Take-Profit PnL" msgstr "" @@ -6408,10 +6379,6 @@ msgstr "" #: src/components/Synthetics/Claims/ClaimHistoryRow/ClaimFundingFeesHistoryRow.tsx #: src/components/Synthetics/Claims/ClaimHistoryRow/ClaimFundingFeesHistoryRow.tsx #: src/components/Synthetics/Claims/ClaimsHistory.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/MarketCard/MarketCard.tsx #: src/components/Synthetics/MarketNetFee/MarketNetFee.tsx #: src/components/Synthetics/PositionEditor/PositionEditor.tsx @@ -6554,7 +6521,6 @@ msgid "Failed Settlement of Funding Fees" msgstr "" #: src/components/Exchange/ConfirmationBox.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx msgid "Pay Amount" msgstr "Somme à payer" @@ -6624,7 +6590,7 @@ msgstr "" msgid "{ordersText} cancelled" msgstr "" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx +#: src/components/Synthetics/TradeBox/hooks/useTradeButtonState.tsx msgid "Limit price below Mark Price" msgstr "" @@ -6649,7 +6615,7 @@ msgid "Transaction was cancelled." msgstr "Transaction annulée." #: src/components/Exchange/ConfirmationBox.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx +#: src/components/Synthetics/TradeBox/hooks/useTradeButtonState.tsx msgid "Accept confirmation of trigger orders" msgstr "Accepter la confirmation des ordres de déclenchement" @@ -6920,10 +6886,6 @@ msgstr "Vous avez un transfert en attente de {expéditeur}." msgid "Enter a trigger price" msgstr "" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -msgid "Limit Order Price will vary based on Fees and Price Impact to guarantee the Min. Receive amount." -msgstr "" - #: src/pages/BeginAccountTransfer/BeginAccountTransfer.tsx msgid "Vested GLP not withdrawn" msgstr "GLP vesté non retiré" @@ -6935,11 +6897,9 @@ msgstr "GLP vesté non retiré" #: src/components/Exchange/PositionsList.js #: src/components/Exchange/SwapBox.js #: src/components/Exchange/SwapBox.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/PositionEditor/PositionEditor.tsx #: src/components/Synthetics/PositionItem/PositionItem.tsx #: src/components/Synthetics/PositionList/PositionList.tsx -#: src/components/Synthetics/TradeBox/TradeBox.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/EntryPriceRow.tsx #: src/pages/LeaderboardPage/components/LeaderboardPositionsTable.tsx msgid "Entry Price" msgstr "Prix d'entrée" @@ -6962,6 +6922,7 @@ msgstr "" #: src/components/AddressDropdown/AddressDropdown.tsx #: src/components/Synthetics/SubaccountModal/SubaccountModal.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/OneClickTrading.tsx msgid "One-Click Trading" msgstr "" @@ -7025,11 +6986,10 @@ msgid "SELL…" msgstr "" #: src/components/Exchange/ConfirmationBox.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx msgid "Confirm Swap" msgstr "Confirmer l'échange" -#: src/components/Synthetics/PositionSeller/PositionSeller.tsx +#: src/components/Synthetics/PositionSeller/PositionSellerAdvancedDisplayRows.tsx msgid "Keep leverage is not available as Position exceeds max. allowed leverage. <0>Read more." msgstr "" @@ -7093,6 +7053,10 @@ msgstr "" msgid "<0>The APY is an estimate based on the fees collected for the past seven days, extrapolating the current borrowing fee. It excludes:<1><2>price changes of the underlying token(s)<3>traders' PnL, which is expected to be neutral in the long term<4>funding fees, which are exchanged between traders<5><6>Read more about GM token pricing.<7>Check GM pools' performance against other LP Positions in the <8>GMX Dune Dashboard." msgstr "" +#: src/components/Synthetics/TradeBox/TradeBoxRows/OneClickTrading.tsx +msgid "Top-Up" +msgstr "" + #: src/components/Synthetics/MarketCard/MarketCard.tsx msgid "Ask Price (Exit)" msgstr "" @@ -7105,6 +7069,10 @@ msgstr "" msgid "Orders ({ordersCount})" msgstr "" +#: src/components/Synthetics/TradeBox/hooks/useCollateralInTooltipContent.tsx +msgid "You will be long {indexSymbol} from your long position, as well as from your {collateralSymbol} collateral. The liquidation price is higher compared to using a stablecoin as collateral since the worth of the collateral will change with its price." +msgstr "" + #: src/pages/Ecosystem/Ecosystem.js msgid "GMX explorer for stats and traders" msgstr "Explorateur GMX pour les statistiques et les traders" @@ -7150,7 +7118,7 @@ msgstr "" msgid "Fee values do not include incentives." msgstr "" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx +#: src/components/Synthetics/TradeBox/hooks/useTradeButtonState.tsx msgid "Limit price above Mark Price" msgstr "" @@ -7166,7 +7134,6 @@ msgstr "" #: src/components/Exchange/SwapBox.js #: src/components/Exchange/SwapBox.js #: src/components/Exchange/SwapBox.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/OrderList/filters/OrderTypeFilter.tsx #: src/components/Synthetics/StatusNotification/OrderStatusNotification.tsx #: src/components/Synthetics/SwapCard/SwapCard.tsx @@ -7328,10 +7295,8 @@ msgstr "" #: src/components/Exchange/PositionSeller.js #: src/components/Exchange/PositionsList.js #: src/components/Exchange/PositionsList.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/OrderItem/OrderItem.tsx #: src/components/Synthetics/OrderList/OrderList.tsx -#: src/components/Synthetics/PositionEditor/PositionEditor.tsx #: src/components/Synthetics/PositionItem/PositionItem.tsx #: src/components/Synthetics/PositionList/PositionList.tsx #: src/components/Synthetics/TradeHistory/useDownloadAsCsv.tsx @@ -7438,7 +7403,7 @@ msgid "short" msgstr "" #: src/components/Exchange/ConfirmationBox.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx +#: src/components/Synthetics/TradeBox/hooks/useTriggerOrdersConsent.tsx msgid "I am aware of the trigger orders" msgstr "Je suis conscient des ordres de déclenchement" @@ -7483,12 +7448,12 @@ msgstr "Prix ​​d'exécution de l'ordre" #: src/components/Exchange/ConfirmationBox.js #: src/components/Exchange/PositionSeller.js -#: src/components/Synthetics/ConfirmationBox/rows/AllowedSlippageRow.tsx #: src/components/Synthetics/PositionSeller/rows/AllowedSlippageRow.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/AllowedSlippageRow.tsx msgid "Slippage is too high" msgstr "" -#: src/components/Synthetics/ConfirmationBox/SideOrderEntries.tsx +#: src/components/Synthetics/TradeBox/components/SideOrderEntries.tsx msgid "Add Row" msgstr "" @@ -7543,12 +7508,12 @@ msgstr "" #: src/components/Exchange/OrdersList.js #: src/components/Exchange/OrdersList.js #: src/components/Exchange/SwapBox.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/OrderEditor/OrderEditor.tsx #: src/components/Synthetics/OrderItem/OrderItem.tsx #: src/components/Synthetics/OrderList/filters/OrderTypeFilter.tsx #: src/components/Synthetics/PositionItem/PositionItem.tsx #: src/components/Synthetics/TradeBox/TradeBox.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/LimitAndTPSLRows.tsx #: src/components/Synthetics/TradeHistory/keys.ts msgid "Limit" msgstr "Limite" @@ -7571,7 +7536,6 @@ msgid "<0>Insufficient liquidity to execute the order<1>The mark price which msgstr "<0>Liquidité insuffisante pour exécuter l'ordre<1>Le prix de référence, qui est un agrégat de prix d'échanges, n'a pas atteint le prix spécifié<2>Le prix spécifié a été atteint mais pas assez longtemps pour qu'il soit exécuté.<3>Aucun gardien n'a pris l'ordre d'exécution" #: src/components/Exchange/ConfirmationBox.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx msgid "Your position's collateral after deducting fees:" msgstr "Le collatéral de votre position après déduction des frais:" @@ -7621,8 +7585,8 @@ msgstr "" msgid "01 Sep 2021" msgstr "01 Sep 2021" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/OrderList/filters/OrderTypeFilter.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/LimitAndTPSLRows.tsx #: src/domain/synthetics/positions/utils.ts msgid "Take-Profit" msgstr "" diff --git a/src/locales/ja/messages.po b/src/locales/ja/messages.po index a929e7e364..9585ae4487 100644 --- a/src/locales/ja/messages.po +++ b/src/locales/ja/messages.po @@ -79,7 +79,6 @@ msgid "Subaccount generation failed" msgstr "" #: src/components/Exchange/ConfirmationBox.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx msgid "{existingTriggerOrderLength, plural, one {You have an active trigger order that might execute immediately after you open this position. Please cancel the order or accept the confirmation to continue.} other {You have # active trigger orders that might execute immediately after you open this position. Please cancel the orders or accept the confirmation to continue.}}" msgstr "{existingTriggerOrderLength, plural, one {このポジションをオープンした後ただちに執行される可能性があるアクティブなトリガー注文があります。注文をキャンセルするか、または確認を押して続けてください。} other {このポジションをオープンした後ただちに執行される可能性があるアクティブなトリガー注文が#あります。注文をキャンセルするか、または確認を押して続けてください。}}" @@ -155,6 +154,10 @@ msgstr "{0}はターゲットウェイトを超過しています。<0/><1/>ト msgid "Withdrawal error." msgstr "" +#: src/components/Synthetics/TradeBox/TradeBox.tsx +msgid "The execution price will constantly vary based on fees and price impact to guarantee that you receive the minimum receive amount." +msgstr "" + #: src/pages/Home/Home.js msgid "Decentralized<0/>Perpetual Exchange" msgstr "分散型<0/>パーペチュアル取引所" @@ -236,7 +239,6 @@ msgstr "" #: src/components/Glp/GlpSwap.js #: src/components/Glp/GlpSwap.js #: src/components/Glp/GlpSwap.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/OrderEditor/OrderEditor.tsx #: src/components/Synthetics/TradeFeesRow/TradeFeesRow.tsx msgid "Fees" @@ -403,8 +405,6 @@ msgid "Insufficient liquidity in the {0} market pool. Select a different pool fo msgstr "" #: src/components/Exchange/ConfirmationBox.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx msgid "Confirm Limit Order" msgstr "" @@ -515,6 +515,7 @@ msgstr "" msgid "Incentives are airdropped weekly." msgstr "" +#: src/components/Synthetics/AcceptablePriceImpactInputRow/AcceptablePriceImpactInputRow.tsx #: src/components/Synthetics/AcceptablePriceImpactInputRow/AcceptablePriceImpactInputRow.tsx msgid "Acceptable Price Impact" msgstr "" @@ -527,10 +528,6 @@ msgstr "メタマスクに追加" msgid "Insufficient staked tokens" msgstr "" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -msgid "New Collateral" -msgstr "" - #: src/lib/wallets/connecters/binanceW3W/binanceWallet.ts msgid "Tap [Create Wallet] to start using your Web3 Wallet." msgstr "ウェブ3ウォレットを使用するには[ウォレットを作成]をタップしてください。" @@ -721,8 +718,6 @@ msgstr "" #: src/components/Exchange/SwapBox.js #: src/components/Glp/GlpSwap.js #: src/components/Glp/GlpSwap.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/GmSwap/GmConfirmationBox/GmConfirmationBox.tsx #: src/components/Synthetics/GmSwap/GmConfirmationBox/GmConfirmationBox.tsx #: src/components/Synthetics/GmSwap/GmSwapBox/GmSwapBox.tsx @@ -747,8 +742,8 @@ msgstr "GMXのガバナンスページ" msgid "Decentralized Money Market" msgstr "" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/OrderList/filters/OrderTypeFilter.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/LimitAndTPSLRows.tsx #: src/domain/synthetics/positions/utils.ts msgid "Stop-Loss" msgstr "" @@ -774,10 +769,6 @@ msgstr "{0} GLPがべスティングのためにリザーブされました。" msgid "Buy with {0}" msgstr "{0}で購入" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -msgid "You have an existing position with {0} as collateral. This Order will not be valid for that Position." -msgstr "あなたは{0}を担保として持つ既存のポジションがあります。この注文はそのポジションには有効ではありません。" - #: src/components/Referrals/JoinReferralCode.js msgid "Adding..." msgstr "追加中" @@ -891,8 +882,8 @@ msgid "Unstake completed!" msgstr "" #: src/components/Exchange/ConfirmationBox.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/OrderEditor/OrderEditor.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/MinReceiveRow.tsx msgid "Min. Receive" msgstr "最低受け取り額" @@ -931,8 +922,6 @@ msgstr "" #: src/components/Exchange/OrdersList.js #: src/components/Exchange/PositionsList.js #: src/components/Exchange/PositionsList.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/MarketStats/MarketStats.tsx #: src/components/Synthetics/OrderItem/OrderItem.tsx #: src/components/Synthetics/PositionItem/PositionItem.tsx @@ -1191,8 +1180,7 @@ msgstr "GMXポジション情報提供Telegramボット" msgid "account" msgstr "アカウント" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/TradeBox/TradeBox.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/AdvancedDisplayRows.tsx msgid "Keep leverage at {0}" msgstr "" @@ -1299,6 +1287,10 @@ msgstr "" msgid "Select Positions" msgstr "" +#: src/components/Synthetics/TradeBox/hooks/useCollateralInTooltipContent.tsx +msgid "You will be long {indexSymbol} from your long position, while being long {collateralSymbol} from your {collateralSymbol} collateral. The liquidation price will vary based on the price of {collateralSymbol}." +msgstr "" + #: src/components/Referrals/AffiliatesStats.tsx #: src/components/Referrals/AffiliatesStats.tsx #: src/components/Referrals/TradersStats.tsx @@ -1552,7 +1544,7 @@ msgstr "" msgid "Mark" msgstr "" -#: src/components/Synthetics/PositionSeller/PositionSeller.tsx +#: src/components/Synthetics/PositionSeller/PositionSellerAdvancedDisplayRows.tsx msgid "Keep leverage at {keepLeverageAtValue}" msgstr "" @@ -1708,7 +1700,7 @@ msgstr "コード確認中..." msgid "GM Pools" msgstr "" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/AvailableLiquidityRow.tsx msgid "The order will only execute if the price conditions are met and there is sufficient liquidity." msgstr "" @@ -1747,16 +1739,14 @@ msgstr "" #: src/components/Exchange/PositionsList.js #: src/components/Synthetics/Claims/ClaimsHistory.tsx #: src/components/Synthetics/Claims/ClaimsHistory.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/OrderEditor/OrderEditor.tsx #: src/components/Synthetics/OrderItem/OrderItem.tsx #: src/components/Synthetics/OrderList/OrderList.tsx -#: src/components/Synthetics/PositionEditor/PositionEditor.tsx +#: src/components/Synthetics/PositionEditor/PositionEditorAdvancedRows.tsx #: src/components/Synthetics/PositionItem/PositionItem.tsx #: src/components/Synthetics/PositionList/PositionList.tsx -#: src/components/Synthetics/PositionSeller/PositionSeller.tsx -#: src/components/Synthetics/TradeBox/TradeBox.tsx +#: src/components/Synthetics/PositionSeller/PositionSellerAdvancedDisplayRows.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/AdvancedDisplayRows.tsx #: src/components/Synthetics/TradeHistory/TradeHistory.tsx #: src/components/Synthetics/TradeHistory/useDownloadAsCsv.tsx #: src/pages/LeaderboardPage/components/LeaderboardPositionsTable.tsx @@ -1894,6 +1884,11 @@ msgstr "" msgid "{0} Approved!" msgstr "{0}が承認されました!" +#: src/components/Synthetics/PositionEditor/PositionEditorAdvancedRows.tsx +#: src/components/Synthetics/PositionSeller/PositionSellerAdvancedDisplayRows.tsx +msgid "Advanced display" +msgstr "" + #: src/components/Exchange/SwapBox.js msgid "Long {0}" msgstr "ロング {0}" @@ -1917,7 +1912,7 @@ msgid "Total Trading Volume" msgstr "トレード総額" #: src/components/Exchange/ConfirmationBox.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/CollateralSpreadRow.tsx msgid "Collateral Spread" msgstr "" @@ -2001,10 +1996,6 @@ msgstr "" msgid "Allow {0} to be spent" msgstr "" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -msgid "You have an existing position with {0} as collateral. This action will not apply for that position." -msgstr "あなたは{0}を担保として持つ既存のポジションがあります。このアクションはそのポジションには適用されません。" - #: src/components/Exchange/SwapBox.js msgid "Swap Order created!" msgstr "スワップ注文作成完了!" @@ -2053,7 +2044,7 @@ msgstr "" msgid "{existingTriggerOrderLength, plural, one {You have an active trigger order that could impact this position.} other {You have # active trigger orders that could impact this position.}}" msgstr "{existingTriggerOrderLength, plural, one {このポジションに影響する可能性のあるアクティブなトリガー注文があります。} other {このポジションに影響する可能性のあるアクティブなトリガー注文が#あります。}}" -#: src/components/SubaccountNavigationButton/SubaccountNavigationButton.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/OneClickTrading.tsx msgid "Reduce wallet signing popups with One-Click Trading. This option is also available through the Wallet menu in the top right. <0>Read more." msgstr "ワンクリック取引でウォレット署名のポップアップを減らします。このオプションは右上のウォレットメニューからも利用できます。 <0>詳細について読む" @@ -2069,7 +2060,6 @@ msgstr "" msgid "Swap {0} USDG for{1} {2}" msgstr "" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/OrderItem/OrderItem.tsx msgid "{0} will be swapped to {1} on order execution." msgstr "" @@ -2127,8 +2117,6 @@ msgstr "" #: src/components/Exchange/ConfirmationBox.js #: src/components/Exchange/SwapBox.js #: src/components/Exchange/SwapBox.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/SwapCard/SwapCard.tsx #: src/components/Synthetics/SwapCard/SwapCard.tsx msgid "{0} Price" @@ -2237,6 +2225,10 @@ msgstr "マーク価格を下回る価格" msgid "APRs are updated weekly on Wednesday and will depend on the fees collected for the week." msgstr "APR(実質年利)は毎週水曜日に更新され、その前一週間に得られた手数料によって決まります。" +#: src/components/Synthetics/TradeBox/TradeBoxRows/AdvancedDisplayRows.tsx +msgid "Advanced Display" +msgstr "" + #: src/components/Synthetics/SubaccountModal/utils.ts msgid "Generate & Activate Subaccount" msgstr "" @@ -2294,7 +2286,6 @@ msgid "Couldn't find a swap route with enough liquidity" msgstr "" #: src/components/Exchange/ConfirmationBox.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx msgid "Confirm Long" msgstr "ロングを確認する" @@ -2345,6 +2336,10 @@ msgstr "GLPから引き出し可能な金額。現在オープンなポジショ msgid "Invalid price, see warning" msgstr "無効な価格につき、警告を確認してください" +#: src/components/Synthetics/TradeBox/hooks/useCollateralInTooltipContent.tsx +msgid "You will be short {indexSymbol} only from your short position." +msgstr "" + #: src/pages/Actions/ActionsV1/ActionsV1.tsx msgid "GMX V1 {networkName} actions for all accounts." msgstr "" @@ -2361,6 +2356,10 @@ msgstr "" msgid "You need to select {swapTokenSymbol} as the \"Pay\" token to use it for collateral to initiate this trade." msgstr "この取引を始めるには担保用に{swapTokenSymbol}を\"支払い\"トークンとして選択する必要があります。" +#: src/components/Synthetics/TradeBox/TradeBoxRows/LimitAndTPSLRows.tsx +msgid "There are issues in the TP/SL orders." +msgstr "" + #: src/components/Glp/GlpSwap.js msgid "The Bonus Rebate is an estimate and will be airdropped as ARB tokens when migrating this liquidity to GM pools within the same epoch. <0>Read more." msgstr "" @@ -2398,9 +2397,12 @@ msgstr "現在のプール額" msgid "Cancel failed." msgstr "キャンセルできませんでした" +#: src/components/Synthetics/TradeBox/TradeBoxRows/AvailableLiquidityRow.tsx +msgid "The order will be executed if there is sufficient liquidity and the execution price guarantees that you will receive the minimum receive amount." +msgstr "" + #: src/components/Exchange/ConfirmationBox.js #: src/components/Exchange/PositionSeller.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx msgid "Transacting with a depegged stable coin is subject to spreads reflecting the worse of current market price or $1.00, with transactions involving multiple stablecoins may have multiple spreads." msgstr "" @@ -2445,10 +2447,6 @@ msgstr "マーケット選択" msgid "Open positions: {0}<0/>Under risk: {1}" msgstr "オープンのポジション: {0}<0/>リスクあり: {1}" -#: src/components/SubaccountNavigationButton/SubaccountNavigationButton.tsx -msgid "There are insufficient funds in your Subaccount for One-Click Trading. Click here to top-up." -msgstr "" - #: src/components/Exchange/UsefulLinks.tsx msgid "Speed up page loading" msgstr "ページの読み込みを速くする" @@ -2517,10 +2515,6 @@ msgstr "トレード" msgid "Adding referral code failed." msgstr "紹介コードが追加できませんでした" -#: src/components/SubaccountNavigationButton/SubaccountNavigationButton.tsx -msgid "The previously authorized maximum number of Actions has been reached for One-Click Trading. Click here to re-authorize." -msgstr "" - #: src/components/Exchange/PositionEditor.js msgid "Max leverage without PnL: {0}x" msgstr "" @@ -2680,13 +2674,12 @@ msgstr "" #: src/components/Exchange/PositionSeller.js #: src/components/Exchange/SwapBox.js #: src/components/Exchange/SwapBox.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/OrderEditor/OrderEditor.tsx -#: src/components/Synthetics/PositionEditor/PositionEditor.tsx -#: src/components/Synthetics/PositionSeller/PositionSeller.tsx -#: src/components/Synthetics/TradeBox/TradeBox.tsx -#: src/components/Synthetics/TradeBox/TradeBox.tsx +#: src/components/Synthetics/PositionEditor/PositionEditorAdvancedRows.tsx +#: src/components/Synthetics/PositionSeller/PositionSellerAdvancedDisplayRows.tsx #: src/components/Synthetics/TradeBox/TradeBox.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/AdvancedDisplayRows.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/AdvancedDisplayRows.tsx msgid "Leverage" msgstr "レバレッジ" @@ -2791,10 +2784,6 @@ msgstr "" msgid "Claim failed." msgstr "請求できませんでした。" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -msgid "You have selected {collateralTokenSymbol} as collateral; the liquidation price is higher compared to using a stablecoin as collateral since the worth of the collateral will change with its price. If required and available, you can change the collateral type using the \"Collateral In\" option in the trade box." -msgstr "あなたは担保として{collateralTokenSymbol}を選択しました。担保の価値はその価格によって変動するため、担保としてステーブルコインを使用する場合と比較して、清算価格が高くなります。必要に応じて、トレードボックスの「担保資産」オプションを使用して担保の種類を変更できます。" - #: src/components/Synthetics/Claims/SettleAccruedCard.tsx msgid "Accrued Price Impact Rebates. They will become Claimable after some time.<0/><1/><2>Read more." msgstr "" @@ -2861,10 +2850,6 @@ msgstr "" msgid "GM can be sold for {0} and {1} for this market up to the specified selling caps. The remaining tokens in the pool are reserved for currently open positions." msgstr "" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -msgid "Collateral value may differ due to different Price Impact at the time of execution." -msgstr "" - #: src/components/Synthetics/ExecutionPriceRow.tsx #: src/components/Synthetics/TradeHistory/TradeHistoryRow/utils/position.ts #: src/components/Synthetics/TradeHistory/TradeHistoryRow/utils/position.ts @@ -2967,6 +2952,10 @@ msgstr "ArbitrumでGMXを使ってべスティングする" msgid "{longOrShort} positions {fundingAction} a funding fee of {fundingRate} per hour and {borrowAction} a borrow fee of {borrowRate} per hour." msgstr "" +#: src/components/Synthetics/TradeBox/TradeBoxRows/LimitAndTPSLRows.tsx +msgid "Limit / TP / SL" +msgstr "" + #: src/components/Exchange/OrderEditor.js #: src/components/Synthetics/OrderEditor/OrderEditor.tsx msgid "Updating Order..." @@ -3029,8 +3018,8 @@ msgstr "トレード履歴はありません" #: src/components/Exchange/ConfirmationBox.js #: src/components/Exchange/PositionSeller.js #: src/components/SettingsModal/SettingsModal.tsx -#: src/components/Synthetics/ConfirmationBox/rows/AllowedSlippageRow.tsx #: src/components/Synthetics/PositionSeller/rows/AllowedSlippageRow.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/AllowedSlippageRow.tsx msgid "Allowed Slippage" msgstr "最大スリッページ" @@ -3147,12 +3136,11 @@ msgstr "スワップ申し込み完了。" #: src/components/Exchange/PositionSeller.js #: src/components/Exchange/PositionsList.js #: src/components/Exchange/TradeHistory.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/PositionItem/PositionItem.tsx #: src/components/Synthetics/PositionItem/PositionItem.tsx -#: src/components/Synthetics/PositionSeller/PositionSeller.tsx -#: src/components/Synthetics/PositionSeller/PositionSeller.tsx -#: src/components/Synthetics/TradeBox/TradeBox.tsx +#: src/components/Synthetics/PositionSeller/PositionSellerAdvancedDisplayRows.tsx +#: src/components/Synthetics/PositionSeller/PositionSellerAdvancedDisplayRows.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/AdvancedDisplayRows.tsx #: src/components/Synthetics/TradeHistory/TradeHistoryRow/utils/position.ts #: src/pages/AccountDashboard/DailyAndCumulativePnL.tsx #: src/pages/Actions/ActionsV1/ActionsV1.tsx @@ -3176,6 +3164,7 @@ msgstr "" #: src/components/Exchange/PositionEditor.js #: src/components/Exchange/PositionEditor.js #: src/components/Synthetics/PositionEditor/PositionEditor.tsx +#: src/components/Synthetics/PositionEditor/types.ts #: src/components/Synthetics/SubaccountModal/SubaccountModal.tsx #: src/components/Synthetics/TradeHistory/keys.ts #: src/pages/Stake/StakeV2.tsx @@ -3261,8 +3250,8 @@ msgstr "ポジションは最大スリッページ {1}%で{0} USDでオープン msgid "Active Referral Code" msgstr "有効な紹介コード" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/PositionEditor/PositionEditor.tsx +#: src/components/Synthetics/TradeBox/hooks/useTradeWarningsRows.tsx msgid "Pending {0} approval" msgstr "" @@ -3274,6 +3263,10 @@ msgstr "ネットワークをArbitrumに切り替えてください。" msgid "The position would be immediately liquidated upon order execution. Try reducing the size." msgstr "" +#: src/components/Synthetics/TradeBox/TradeBoxRows/OneClickTrading.tsx +msgid "Enable" +msgstr "" + #: src/components/Synthetics/GmList/GmList.tsx #: src/components/Synthetics/MarketTokenSelector/MarketTokenSelector.tsx msgid "BUYABLE" @@ -3305,6 +3298,10 @@ msgstr "" msgid "You have yet to reach the minimum \"Capital Used\" of {0} to qualify for the rankings." msgstr "" +#: src/components/Synthetics/TradeBox/TradeBoxRows/LimitPriceRow.tsx +msgid "The execution price for the limit order updates in real-time on the orders tab after order creation to guarantee that you receive the minimum receive amount." +msgstr "" + #: src/components/Exchange/SwapBox.js msgid "Swap amount exceeds Available Liquidity." msgstr "" @@ -3326,8 +3323,8 @@ msgstr "前へ" msgid "Unknown buy GM order" msgstr "" -#: src/components/Synthetics/ConfirmationBox/rows/AllowedSlippageRow.tsx #: src/components/Synthetics/PositionSeller/rows/AllowedSlippageRow.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/AllowedSlippageRow.tsx msgid "You can edit the default Allowed Slippage in the settings menu on the top right of the page.<0/><1/>Note that a low allowed slippage, e.g. less than -{0}, may result in failed orders if prices are volatile." msgstr "" @@ -3363,7 +3360,7 @@ msgstr "報酬獲得" #: src/components/Exchange/SwapBox.js #: src/components/Synthetics/CollateralSelector/CollateralSelector.tsx #: src/components/Synthetics/CollateralSelector/CollateralSelector.tsx -#: src/components/Synthetics/TradeBox/CollateralSelectorRow.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/CollateralSelectorRow.tsx msgid "Collateral In" msgstr "担保の種類" @@ -3383,8 +3380,8 @@ msgstr "トレード案内" msgid "TRADING Airdrop" msgstr "" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -msgid "Limit Order Price to guarantee Min. Receive amount is updated in real time in the Orders tab after the order has been created." +#: src/components/Synthetics/TradeBox/hooks/useCollateralInTooltipContent.tsx +msgid "You will be short {indexSymbol} from your short position, while being long {collateralSymbol} from your {collateralSymbol} collateral. This can be useful for delta-neutral strategies to earn funding fees." msgstr "" #: src/components/Referrals/TradersStats.tsx @@ -3445,8 +3442,8 @@ msgstr "" msgid "The Execution Price didn't meet the Acceptable Price condition. The Order will get filled when the condition is met." msgstr "実行価格が許容価格条件を満たしませんでした。条件を満たしたときに注文が執行されます。" -#: src/components/Synthetics/PositionEditor/PositionEditor.tsx -#: src/components/Synthetics/PositionSeller/PositionSeller.tsx +#: src/components/Synthetics/PositionEditor/PositionEditorAdvancedRows.tsx +#: src/components/Synthetics/PositionSeller/PositionSellerAdvancedDisplayRows.tsx msgid "Initial Collateral (Collateral excluding Borrow and Funding Fee)." msgstr "" @@ -3466,15 +3463,15 @@ msgstr "ストラクチャードプロダクト" #: src/components/AprInfo/AprInfo.tsx #: src/components/AprInfo/AprInfo.tsx #: src/components/Synthetics/AcceptablePriceImpactInputRow/AcceptablePriceImpactInputRow.tsx -#: src/components/Synthetics/PositionSeller/PositionSeller.tsx -#: src/components/Synthetics/TradeBox/TradeBox.tsx +#: src/components/Synthetics/PositionSeller/PositionSellerAdvancedDisplayRows.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/AdvancedDisplayRows.tsx #: src/pages/LeaderboardPage/components/LeaderboardAccountsTable.tsx #: src/pages/LeaderboardPage/components/LeaderboardPositionsTable.tsx #: src/pages/LeaderboardPage/components/LeaderboardPositionsTable.tsx msgid "NA" msgstr "" -#: src/components/Synthetics/TradeBox/CollateralSelectorRow.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/CollateralSelectorRow.tsx msgid "You have an existing position with {0} as collateral. This action will not apply for that position. <0>Switch to {1} collateral." msgstr "" @@ -3511,10 +3508,6 @@ msgstr "注文のトリガー価格" #: src/components/Synthetics/Claims/ClaimHistoryRow/ClaimFundingFeesHistoryRow.tsx #: src/components/Synthetics/Claims/ClaimHistoryRow/ClaimFundingFeesHistoryRow.tsx #: src/components/Synthetics/Claims/ClaimsHistory.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/MarketCard/MarketCard.tsx #: src/components/Synthetics/MarketNetFee/MarketNetFee.tsx #: src/components/Synthetics/PositionEditor/PositionEditor.tsx @@ -3587,8 +3580,6 @@ msgstr "" #: src/components/Exchange/PositionsList.js #: src/components/Exchange/PositionsList.js #: src/components/Exchange/SwapBox.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/OrderEditor/OrderEditor.tsx #: src/components/Synthetics/PositionEditor/PositionEditor.tsx #: src/components/Synthetics/PositionItem/PositionItem.tsx @@ -3659,10 +3650,6 @@ msgstr "GMXでトレードして賞金<0>250ドルを獲得しよう! 11月3 msgid "You are leaving GMX.io and will be redirected to a third party, independent website." msgstr "あなたはGMX.ioを離れ、第三者の別のウェブサイトへ転送されます。" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -msgid "You have selected {collateralTokenSymbol} as collateral to short {indexTokenSymbol}." -msgstr "" - #: src/components/Synthetics/PositionItem/PositionItem.tsx #: src/components/Synthetics/PositionItem/PositionItem.tsx msgid "Accrued Borrow Fee" @@ -3698,10 +3685,10 @@ msgstr "" msgid "<0>Notifications are provided by Notifi and not affiliated with GMX. By subscribing, you agree that info you provide to Notifi will be governed by its <1>Privacy Policy<2> and <3>Terms of Use." msgstr "" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/GmSwap/GmConfirmationBox/GmConfirmationBox.tsx #: src/components/Synthetics/PositionEditor/PositionEditor.tsx #: src/components/Synthetics/PositionSeller/PositionSeller.tsx +#: src/components/Synthetics/TradeBox/hooks/useTradeWarningsRows.tsx msgid "High Network Fee not yet acknowledged" msgstr "" @@ -3742,11 +3729,6 @@ msgstr "" msgid "UI Fee" msgstr "" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -msgid "Confirm {0} Order" -msgstr "" - #: src/domain/synthetics/orders/simulateExecuteOrderTxn.tsx #: src/domain/synthetics/orders/simulateExecuteOrderTxn.tsx msgid "Execute order simulation failed." @@ -3791,9 +3773,10 @@ msgstr "" #: src/components/Exchange/ConfirmationBox.js #: src/components/Exchange/PositionSeller.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/PositionEditor/PositionEditor.tsx #: src/components/Synthetics/PositionSeller/PositionSeller.tsx +#: src/components/Synthetics/TradeBox/hooks/useTradeButtonState.tsx +#: src/components/Synthetics/TradeBox/TradeBox.tsx msgid "Creating Order..." msgstr "注文作成中..." @@ -4058,7 +4041,6 @@ msgstr "減額しました" #: src/components/Exchange/OrdersList.js #: src/components/Exchange/TradeHistory.js #: src/components/Exchange/TradeHistory.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/domain/synthetics/orders/utils.tsx #: src/pages/OrdersOverview/OrdersOverview.js msgid "Decrease" @@ -4093,11 +4075,15 @@ msgstr "12月" msgid "GMX Weekly Updates" msgstr "GMXの週ごとの最新情報" +#: src/components/Synthetics/TradeBox/hooks/useCollateralInTooltipContent.tsx +msgid "You will be long {indexSymbol} only from your long position." +msgstr "" + #: src/pages/OrdersOverview/OrdersOverview.js msgid "Total active: {openTotal}, executed: {executedTotal}, cancelled: {cancelledTotal}" msgstr "合計 アクティブ: {openTotal} 執行済: {executedTotal} キャンセル済: {cancelledTotal}" -#: src/components/Synthetics/TradeBox/CollateralSelectorRow.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/CollateralSelectorRow.tsx msgid "You have an existing order with {symbol} as collateral. <0>Switch to {symbol} collateral." msgstr "" @@ -4132,7 +4118,7 @@ msgstr "" msgid "Yield simulator for GMX" msgstr "GMXのイールドシミュレーター" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/AvailableLiquidityRow.tsx msgid "There may not be sufficient liquidity to execute your order when the Min. Receive are met." msgstr "" @@ -4178,9 +4164,9 @@ msgstr "" #: src/components/Exchange/SwapBox.js #: src/components/Exchange/SwapBox.js #: src/components/Exchange/SwapBox.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/MarketCard/MarketCard.tsx #: src/components/Synthetics/SwapCard/SwapCard.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/AvailableLiquidityRow.tsx msgid "Available Liquidity" msgstr "利用可能な流動性" @@ -4269,12 +4255,9 @@ msgstr "" #: src/components/Exchange/ConfirmationBox.js #: src/components/Exchange/PositionEditor.js #: src/components/Exchange/PositionSeller.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/PositionEditor/PositionEditor.tsx -#: src/components/Synthetics/PositionSeller/PositionSeller.tsx -#: src/components/Synthetics/TradeBox/TradeBox.tsx +#: src/components/Synthetics/PositionEditor/PositionEditorAdvancedRows.tsx +#: src/components/Synthetics/PositionSeller/PositionSellerAdvancedDisplayRows.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/AdvancedDisplayRows.tsx msgid "Collateral ({0})" msgstr "担保 ({0})" @@ -4286,6 +4269,14 @@ msgstr "" msgid "Order updated!" msgstr "注文更新完了!" +#: src/components/Synthetics/TradeBox/hooks/useCollateralInTooltipContent.tsx +msgid "You will be short {indexSymbol} from your short position, while being long {collateralSymbol} from your {collateralSymbol} collateral. The liquidation price will vary based on the price of {collateralSymbol}." +msgstr "" + +#: src/components/Synthetics/TradeBox/TradeBoxRows/OneClickTrading.tsx +msgid "The previously authorized maximum number of actions has been reached for One-Click Trading." +msgstr "" + #: src/components/Synthetics/CollateralSelector/CollateralSelector.tsx #: src/components/Synthetics/CollateralSelector/CollateralSelector.tsx msgid "Select a pool containing {0} to use it as collateral." @@ -4324,7 +4315,6 @@ msgid "Max Leverage without PnL: 100x" msgstr "" #: src/components/Exchange/ConfirmationBox.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx msgid "Confirm Short" msgstr "ショートを確認する" @@ -4340,10 +4330,6 @@ msgstr "" msgid "Order Type" msgstr "" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -msgid "Decrease size" -msgstr "" - #: src/components/Synthetics/StatusNotification/GmStatusNotification.tsx msgid "Sell order executed" msgstr "" @@ -4360,13 +4346,9 @@ msgstr "" msgid "Affiliate Rewards Claimed" msgstr "" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -msgid "Old Collateral" -msgstr "" - #: src/components/Exchange/ConfirmationBox.js #: src/components/Exchange/PositionSeller.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/SwapSpreadRow.tsx msgid "Spread" msgstr "スプレッド" @@ -4402,6 +4384,10 @@ msgstr "ロード中" msgid "Leaderboard for GMX traders" msgstr "GMXトレーダー順位表" +#: src/components/Synthetics/TradeBox/TradeBoxRows/OneClickTrading.tsx +msgid "There are insufficient funds in your subaccount for One-Click Trading" +msgstr "" + #: src/components/Exchange/PositionsList.js msgid "Share" msgstr "シェア" @@ -4546,7 +4532,7 @@ msgstr "" msgid "GLP autocompounding vaults" msgstr "" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx +#: src/components/Synthetics/TradeBox/hooks/useTradeButtonState.tsx msgid "TP/SL orders exceed the position" msgstr "" @@ -4575,7 +4561,7 @@ msgstr "ポジションをクローズする際、利益をどのトークンで msgid "Top PnL (%)" msgstr "" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/AvailableLiquidityRow.tsx #: src/domain/synthetics/orders/utils.tsx msgid "There may not be sufficient liquidity to execute your order when the price conditions are met." msgstr "" @@ -4774,7 +4760,7 @@ msgstr "" msgid "Begin Transfer" msgstr "移転開始" -#: src/components/SubaccountNavigationButton/SubaccountNavigationButton.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/OneClickTrading.tsx msgid "One-Click Trading is not available for wrapping or unwrapping native token {0}." msgstr "" @@ -4823,7 +4809,7 @@ msgstr "" msgid "Cancel" msgstr "キャンセル" -#: src/components/Synthetics/ConfirmationBox/SideOrderEntries.tsx +#: src/components/Synthetics/TradeBox/components/SideOrderEntries.tsx msgid "Remove Row" msgstr "" @@ -4849,10 +4835,6 @@ msgstr "注文はキャンセルされました。" msgid "Buy or Transfer AVAX to Avalanche" msgstr "" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -msgid "You have selected {collateralTokenSymbol} as Collateral, the Liquidation Price will vary based on the price of {collateralTokenSymbol}." -msgstr "" - #: src/pages/Ecosystem/Ecosystem.js msgid "Telegram bot for Open Interest on GMX" msgstr "GMX建玉情報提供Telegramボット" @@ -4903,7 +4885,7 @@ msgstr "" msgid "Enter new amount or price" msgstr "" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/LimitAndTPSLRows.tsx msgid "Stop-Loss PnL" msgstr "" @@ -5034,7 +5016,7 @@ msgstr "あなたが紹介したトレーダーによる取引高" msgid "Stablecoin Percentage" msgstr "ステーブルコイン比率" -#: src/components/Synthetics/TradeBox/CollateralSelectorRow.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/CollateralSelectorRow.tsx msgid "You have an existing position with {0} as collateral. This Order will not be valid for that Position. <0>Switch to {1} collateral." msgstr "" @@ -5269,6 +5251,10 @@ msgstr "" msgid "Claim esGMX" msgstr "esGMXの請求" +#: src/components/Synthetics/TradeBox/TradeBoxRows/OneClickTrading.tsx +msgid "Re-authorize" +msgstr "" + #: src/pages/BuyGMX/BuyGMX.tsx msgid "Buy or Transfer ETH to Arbitrum" msgstr "" @@ -5449,10 +5435,6 @@ msgstr "" msgid "Max Out" msgstr "" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -msgid "The order will only execute if the Min. Receive is met and there is sufficient liquidity." -msgstr "" - #: src/components/Exchange/PositionEditor.js #: src/components/Exchange/PositionSeller.js #: src/components/Exchange/PositionSeller.js @@ -5677,7 +5659,7 @@ msgstr "" msgid "{0} and {1} can be used to buy GM for this market up to the specified buying caps." msgstr "" -#: src/components/SubaccountNavigationButton/SubaccountNavigationButton.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/OneClickTrading.tsx msgid "One-Click Trading is not available using network's native token {0}. Consider using {1} instead." msgstr "" @@ -5755,8 +5737,7 @@ msgstr "" #: src/components/Exchange/ConfirmationBox.js #: src/components/Exchange/ConfirmationBox.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/LimitPriceRow.tsx msgid "Limit Price" msgstr "指値" @@ -5780,6 +5761,7 @@ msgstr "{0} {longOrShortText}への入金を実行できませんでした" #: src/components/Exchange/PositionEditor.js #: src/components/Exchange/PositionEditor.js #: src/components/Synthetics/PositionEditor/PositionEditor.tsx +#: src/components/Synthetics/PositionEditor/types.ts #: src/components/Synthetics/TradeHistory/keys.ts #: src/pages/Stake/StakeV2.tsx #: src/pages/Stake/StakeV2.tsx @@ -5815,10 +5797,6 @@ msgstr "レバレッジ有効化中..." msgid "There may not be sufficient liquidity to execute the swap to the receive token when the price conditions are met." msgstr "" -#: src/components/SubaccountNavigationButton/SubaccountNavigationButton.tsx -msgid "Enable One-Click Trading" -msgstr "" - #: src/components/NotifyModal/NotifyModal.tsx msgid "Trade Errors" msgstr "" @@ -5842,8 +5820,6 @@ msgstr "" #: src/components/Exchange/SwapBox.js #: src/components/Glp/GlpSwap.js #: src/components/Glp/GlpSwap.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/GmSwap/GmConfirmationBox/GmConfirmationBox.tsx #: src/components/Synthetics/GmSwap/GmConfirmationBox/GmConfirmationBox.tsx #: src/components/Synthetics/GmSwap/GmSwapBox/GmSwapBox.tsx @@ -5911,9 +5887,9 @@ msgstr "" msgid "There are insufficient funds in your Subaccount for One-Click Trading. <0>Click here to top-up." msgstr "" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx +#: src/components/Synthetics/TradeBox/hooks/useTradeboxTransactions.tsx +#: src/components/Synthetics/TradeBox/hooks/useTradeboxTransactions.tsx +#: src/components/Synthetics/TradeBox/hooks/useTradeboxTransactions.tsx msgid "Error submitting order" msgstr "" @@ -6009,10 +5985,6 @@ msgstr "" msgid "Rebates" msgstr "" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -msgid "The spread is > 1%, please ensure the trade details are acceptable before comfirming" -msgstr "" - #: src/components/Glp/GlpSwap.js msgid "Sell failed." msgstr "売却できませんでした。" @@ -6046,7 +6018,7 @@ msgstr "" msgid "Date" msgstr "日付" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx +#: src/components/Synthetics/TradeBox/hooks/useTradeWarningsRows.tsx #: src/domain/synthetics/trade/utils/validation.ts #: src/domain/synthetics/trade/utils/validation.ts #: src/domain/synthetics/trade/utils/validation.ts @@ -6086,7 +6058,6 @@ msgid "Price above Mark Price" msgstr "マーク価格を上回る価格" #: src/components/Exchange/PositionSeller.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/OrderItem/OrderItem.tsx #: src/components/Synthetics/OrderList/OrderList.tsx #: src/components/Synthetics/PositionSeller/PositionSeller.tsx @@ -6167,7 +6138,7 @@ msgstr "" msgid "The amount left in the subaccount is not enough to cover network gas costs." msgstr "" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/LimitAndTPSLRows.tsx msgid "Take-Profit PnL" msgstr "" @@ -6408,10 +6379,6 @@ msgstr "" #: src/components/Synthetics/Claims/ClaimHistoryRow/ClaimFundingFeesHistoryRow.tsx #: src/components/Synthetics/Claims/ClaimHistoryRow/ClaimFundingFeesHistoryRow.tsx #: src/components/Synthetics/Claims/ClaimsHistory.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/MarketCard/MarketCard.tsx #: src/components/Synthetics/MarketNetFee/MarketNetFee.tsx #: src/components/Synthetics/PositionEditor/PositionEditor.tsx @@ -6554,7 +6521,6 @@ msgid "Failed Settlement of Funding Fees" msgstr "" #: src/components/Exchange/ConfirmationBox.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx msgid "Pay Amount" msgstr "支払い額" @@ -6624,7 +6590,7 @@ msgstr "" msgid "{ordersText} cancelled" msgstr "" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx +#: src/components/Synthetics/TradeBox/hooks/useTradeButtonState.tsx msgid "Limit price below Mark Price" msgstr "" @@ -6649,7 +6615,7 @@ msgid "Transaction was cancelled." msgstr "取引はキャンセルされました。" #: src/components/Exchange/ConfirmationBox.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx +#: src/components/Synthetics/TradeBox/hooks/useTradeButtonState.tsx msgid "Accept confirmation of trigger orders" msgstr "トリガー注文の確認に同意する" @@ -6920,10 +6886,6 @@ msgstr "{sender}からの未完了の移転があります。" msgid "Enter a trigger price" msgstr "" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -msgid "Limit Order Price will vary based on Fees and Price Impact to guarantee the Min. Receive amount." -msgstr "" - #: src/pages/BeginAccountTransfer/BeginAccountTransfer.tsx msgid "Vested GLP not withdrawn" msgstr "べスティングされたGLPで引き出されていないもの" @@ -6935,11 +6897,9 @@ msgstr "べスティングされたGLPで引き出されていないもの" #: src/components/Exchange/PositionsList.js #: src/components/Exchange/SwapBox.js #: src/components/Exchange/SwapBox.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/PositionEditor/PositionEditor.tsx #: src/components/Synthetics/PositionItem/PositionItem.tsx #: src/components/Synthetics/PositionList/PositionList.tsx -#: src/components/Synthetics/TradeBox/TradeBox.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/EntryPriceRow.tsx #: src/pages/LeaderboardPage/components/LeaderboardPositionsTable.tsx msgid "Entry Price" msgstr "エントリー価格" @@ -6962,6 +6922,7 @@ msgstr "" #: src/components/AddressDropdown/AddressDropdown.tsx #: src/components/Synthetics/SubaccountModal/SubaccountModal.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/OneClickTrading.tsx msgid "One-Click Trading" msgstr "" @@ -7025,11 +6986,10 @@ msgid "SELL…" msgstr "" #: src/components/Exchange/ConfirmationBox.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx msgid "Confirm Swap" msgstr "スワップを確認する" -#: src/components/Synthetics/PositionSeller/PositionSeller.tsx +#: src/components/Synthetics/PositionSeller/PositionSellerAdvancedDisplayRows.tsx msgid "Keep leverage is not available as Position exceeds max. allowed leverage. <0>Read more." msgstr "" @@ -7093,6 +7053,10 @@ msgstr "" msgid "<0>The APY is an estimate based on the fees collected for the past seven days, extrapolating the current borrowing fee. It excludes:<1><2>price changes of the underlying token(s)<3>traders' PnL, which is expected to be neutral in the long term<4>funding fees, which are exchanged between traders<5><6>Read more about GM token pricing.<7>Check GM pools' performance against other LP Positions in the <8>GMX Dune Dashboard." msgstr "" +#: src/components/Synthetics/TradeBox/TradeBoxRows/OneClickTrading.tsx +msgid "Top-Up" +msgstr "" + #: src/components/Synthetics/MarketCard/MarketCard.tsx msgid "Ask Price (Exit)" msgstr "" @@ -7105,6 +7069,10 @@ msgstr "" msgid "Orders ({ordersCount})" msgstr "" +#: src/components/Synthetics/TradeBox/hooks/useCollateralInTooltipContent.tsx +msgid "You will be long {indexSymbol} from your long position, as well as from your {collateralSymbol} collateral. The liquidation price is higher compared to using a stablecoin as collateral since the worth of the collateral will change with its price." +msgstr "" + #: src/pages/Ecosystem/Ecosystem.js msgid "GMX explorer for stats and traders" msgstr "統計とトレーダー情報のためのGMXエクスプローラー" @@ -7150,7 +7118,7 @@ msgstr "" msgid "Fee values do not include incentives." msgstr "" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx +#: src/components/Synthetics/TradeBox/hooks/useTradeButtonState.tsx msgid "Limit price above Mark Price" msgstr "" @@ -7166,7 +7134,6 @@ msgstr "" #: src/components/Exchange/SwapBox.js #: src/components/Exchange/SwapBox.js #: src/components/Exchange/SwapBox.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/OrderList/filters/OrderTypeFilter.tsx #: src/components/Synthetics/StatusNotification/OrderStatusNotification.tsx #: src/components/Synthetics/SwapCard/SwapCard.tsx @@ -7328,10 +7295,8 @@ msgstr "" #: src/components/Exchange/PositionSeller.js #: src/components/Exchange/PositionsList.js #: src/components/Exchange/PositionsList.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/OrderItem/OrderItem.tsx #: src/components/Synthetics/OrderList/OrderList.tsx -#: src/components/Synthetics/PositionEditor/PositionEditor.tsx #: src/components/Synthetics/PositionItem/PositionItem.tsx #: src/components/Synthetics/PositionList/PositionList.tsx #: src/components/Synthetics/TradeHistory/useDownloadAsCsv.tsx @@ -7438,7 +7403,7 @@ msgid "short" msgstr "" #: src/components/Exchange/ConfirmationBox.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx +#: src/components/Synthetics/TradeBox/hooks/useTriggerOrdersConsent.tsx msgid "I am aware of the trigger orders" msgstr "トリガー注文について承知しています" @@ -7483,12 +7448,12 @@ msgstr "注文執行価格" #: src/components/Exchange/ConfirmationBox.js #: src/components/Exchange/PositionSeller.js -#: src/components/Synthetics/ConfirmationBox/rows/AllowedSlippageRow.tsx #: src/components/Synthetics/PositionSeller/rows/AllowedSlippageRow.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/AllowedSlippageRow.tsx msgid "Slippage is too high" msgstr "" -#: src/components/Synthetics/ConfirmationBox/SideOrderEntries.tsx +#: src/components/Synthetics/TradeBox/components/SideOrderEntries.tsx msgid "Add Row" msgstr "" @@ -7543,12 +7508,12 @@ msgstr "" #: src/components/Exchange/OrdersList.js #: src/components/Exchange/OrdersList.js #: src/components/Exchange/SwapBox.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/OrderEditor/OrderEditor.tsx #: src/components/Synthetics/OrderItem/OrderItem.tsx #: src/components/Synthetics/OrderList/filters/OrderTypeFilter.tsx #: src/components/Synthetics/PositionItem/PositionItem.tsx #: src/components/Synthetics/TradeBox/TradeBox.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/LimitAndTPSLRows.tsx #: src/components/Synthetics/TradeHistory/keys.ts msgid "Limit" msgstr "指値" @@ -7571,7 +7536,6 @@ msgid "<0>Insufficient liquidity to execute the order<1>The mark price which msgstr "<0>注文執行に必要な流動性が不足しています<1>諸取引所の価格を集約したマーク価格が指値に達しませんでした<2>指値には達したもののロングの度合いが不十分で執行されませんでした<3>どのキーパーも注文を執行しませんでした" #: src/components/Exchange/ConfirmationBox.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx msgid "Your position's collateral after deducting fees:" msgstr "手数料差引後のあなたのポジションの担保" @@ -7621,8 +7585,8 @@ msgstr "" msgid "01 Sep 2021" msgstr "2021年9月1日" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/OrderList/filters/OrderTypeFilter.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/LimitAndTPSLRows.tsx #: src/domain/synthetics/positions/utils.ts msgid "Take-Profit" msgstr "" diff --git a/src/locales/ko/messages.po b/src/locales/ko/messages.po index af314e8a0b..e754bd887b 100644 --- a/src/locales/ko/messages.po +++ b/src/locales/ko/messages.po @@ -79,7 +79,6 @@ msgid "Subaccount generation failed" msgstr "" #: src/components/Exchange/ConfirmationBox.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx msgid "{existingTriggerOrderLength, plural, one {You have an active trigger order that might execute immediately after you open this position. Please cancel the order or accept the confirmation to continue.} other {You have # active trigger orders that might execute immediately after you open this position. Please cancel the orders or accept the confirmation to continue.}}" msgstr "{existingTriggerOrderLength, plural, one {You have an active trigger order that might execute immediately after you open this position. Please cancel the order or accept the confirmation to continue.} other {You have # active trigger orders that might execute immediately after you open this position. Please cancel the orders or accept the confirmation to continue.}}" @@ -155,6 +154,10 @@ msgstr "{0}은 목표 가중치를 초과 했습니다.<0/><1/>토큰을 {1}로 msgid "Withdrawal error." msgstr "" +#: src/components/Synthetics/TradeBox/TradeBox.tsx +msgid "The execution price will constantly vary based on fees and price impact to guarantee that you receive the minimum receive amount." +msgstr "" + #: src/pages/Home/Home.js msgid "Decentralized<0/>Perpetual Exchange" msgstr "탈중앙화<0/>퍼페추얼 거래소" @@ -236,7 +239,6 @@ msgstr "" #: src/components/Glp/GlpSwap.js #: src/components/Glp/GlpSwap.js #: src/components/Glp/GlpSwap.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/OrderEditor/OrderEditor.tsx #: src/components/Synthetics/TradeFeesRow/TradeFeesRow.tsx msgid "Fees" @@ -403,8 +405,6 @@ msgid "Insufficient liquidity in the {0} market pool. Select a different pool fo msgstr "" #: src/components/Exchange/ConfirmationBox.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx msgid "Confirm Limit Order" msgstr "" @@ -515,6 +515,7 @@ msgstr "" msgid "Incentives are airdropped weekly." msgstr "" +#: src/components/Synthetics/AcceptablePriceImpactInputRow/AcceptablePriceImpactInputRow.tsx #: src/components/Synthetics/AcceptablePriceImpactInputRow/AcceptablePriceImpactInputRow.tsx msgid "Acceptable Price Impact" msgstr "" @@ -527,10 +528,6 @@ msgstr "메타마스크에 추가해주세요" msgid "Insufficient staked tokens" msgstr "" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -msgid "New Collateral" -msgstr "" - #: src/lib/wallets/connecters/binanceW3W/binanceWallet.ts msgid "Tap [Create Wallet] to start using your Web3 Wallet." msgstr "웹3 지갑을 사용하려면 [지갑 생성]을 탭하세요." @@ -721,8 +718,6 @@ msgstr "" #: src/components/Exchange/SwapBox.js #: src/components/Glp/GlpSwap.js #: src/components/Glp/GlpSwap.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/GmSwap/GmConfirmationBox/GmConfirmationBox.tsx #: src/components/Synthetics/GmSwap/GmConfirmationBox/GmConfirmationBox.tsx #: src/components/Synthetics/GmSwap/GmSwapBox/GmSwapBox.tsx @@ -747,8 +742,8 @@ msgstr "GMX 거버넌스 페이지" msgid "Decentralized Money Market" msgstr "" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/OrderList/filters/OrderTypeFilter.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/LimitAndTPSLRows.tsx #: src/domain/synthetics/positions/utils.ts msgid "Stop-Loss" msgstr "" @@ -774,10 +769,6 @@ msgstr "{0} GLP가 베스팅을 위해 리저브되었습니다." msgid "Buy with {0}" msgstr "{0}로 구매" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -msgid "You have an existing position with {0} as collateral. This Order will not be valid for that Position." -msgstr "{0}을 담보로 사용한 기존 포지션이 있습니다. 이 주문은 해당 포지션에 유효하지 않습니다." - #: src/components/Referrals/JoinReferralCode.js msgid "Adding..." msgstr "추가중..." @@ -891,8 +882,8 @@ msgid "Unstake completed!" msgstr "" #: src/components/Exchange/ConfirmationBox.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/OrderEditor/OrderEditor.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/MinReceiveRow.tsx msgid "Min. Receive" msgstr "최소 수취량" @@ -931,8 +922,6 @@ msgstr "" #: src/components/Exchange/OrdersList.js #: src/components/Exchange/PositionsList.js #: src/components/Exchange/PositionsList.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/MarketStats/MarketStats.tsx #: src/components/Synthetics/OrderItem/OrderItem.tsx #: src/components/Synthetics/PositionItem/PositionItem.tsx @@ -1191,8 +1180,7 @@ msgstr "GMX 포지션 업데이트를 위한 텔레그램 봇" msgid "account" msgstr "게정" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/TradeBox/TradeBox.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/AdvancedDisplayRows.tsx msgid "Keep leverage at {0}" msgstr "" @@ -1299,6 +1287,10 @@ msgstr "" msgid "Select Positions" msgstr "" +#: src/components/Synthetics/TradeBox/hooks/useCollateralInTooltipContent.tsx +msgid "You will be long {indexSymbol} from your long position, while being long {collateralSymbol} from your {collateralSymbol} collateral. The liquidation price will vary based on the price of {collateralSymbol}." +msgstr "" + #: src/components/Referrals/AffiliatesStats.tsx #: src/components/Referrals/AffiliatesStats.tsx #: src/components/Referrals/TradersStats.tsx @@ -1552,7 +1544,7 @@ msgstr "" msgid "Mark" msgstr "" -#: src/components/Synthetics/PositionSeller/PositionSeller.tsx +#: src/components/Synthetics/PositionSeller/PositionSellerAdvancedDisplayRows.tsx msgid "Keep leverage at {keepLeverageAtValue}" msgstr "" @@ -1708,7 +1700,7 @@ msgstr "코드 확인중..." msgid "GM Pools" msgstr "" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/AvailableLiquidityRow.tsx msgid "The order will only execute if the price conditions are met and there is sufficient liquidity." msgstr "" @@ -1747,16 +1739,14 @@ msgstr "" #: src/components/Exchange/PositionsList.js #: src/components/Synthetics/Claims/ClaimsHistory.tsx #: src/components/Synthetics/Claims/ClaimsHistory.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/OrderEditor/OrderEditor.tsx #: src/components/Synthetics/OrderItem/OrderItem.tsx #: src/components/Synthetics/OrderList/OrderList.tsx -#: src/components/Synthetics/PositionEditor/PositionEditor.tsx +#: src/components/Synthetics/PositionEditor/PositionEditorAdvancedRows.tsx #: src/components/Synthetics/PositionItem/PositionItem.tsx #: src/components/Synthetics/PositionList/PositionList.tsx -#: src/components/Synthetics/PositionSeller/PositionSeller.tsx -#: src/components/Synthetics/TradeBox/TradeBox.tsx +#: src/components/Synthetics/PositionSeller/PositionSellerAdvancedDisplayRows.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/AdvancedDisplayRows.tsx #: src/components/Synthetics/TradeHistory/TradeHistory.tsx #: src/components/Synthetics/TradeHistory/useDownloadAsCsv.tsx #: src/pages/LeaderboardPage/components/LeaderboardPositionsTable.tsx @@ -1894,6 +1884,11 @@ msgstr "" msgid "{0} Approved!" msgstr "{0} 승인 완료!" +#: src/components/Synthetics/PositionEditor/PositionEditorAdvancedRows.tsx +#: src/components/Synthetics/PositionSeller/PositionSellerAdvancedDisplayRows.tsx +msgid "Advanced display" +msgstr "" + #: src/components/Exchange/SwapBox.js msgid "Long {0}" msgstr "롱 {0}" @@ -1917,7 +1912,7 @@ msgid "Total Trading Volume" msgstr "총 트레이딩 거래량" #: src/components/Exchange/ConfirmationBox.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/CollateralSpreadRow.tsx msgid "Collateral Spread" msgstr "" @@ -2001,10 +1996,6 @@ msgstr "" msgid "Allow {0} to be spent" msgstr "" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -msgid "You have an existing position with {0} as collateral. This action will not apply for that position." -msgstr "{0}을 담보로 사용한 기존 포지션이 있습니다. 이 액션은 해당 포지션에 적용되지 않습니다." - #: src/components/Exchange/SwapBox.js msgid "Swap Order created!" msgstr "스완 주문 생성!" @@ -2053,7 +2044,7 @@ msgstr "" msgid "{existingTriggerOrderLength, plural, one {You have an active trigger order that could impact this position.} other {You have # active trigger orders that could impact this position.}}" msgstr "{existingTriggerOrderLength, plural, one {You have an active trigger order that could impact this position.} other {You have # active trigger orders that could impact this position.}}" -#: src/components/SubaccountNavigationButton/SubaccountNavigationButton.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/OneClickTrading.tsx msgid "Reduce wallet signing popups with One-Click Trading. This option is also available through the Wallet menu in the top right. <0>Read more." msgstr "원클릭 트레이딩으로 지갑 서명 팝업을 줄이세요. 이 옵션은 오른쪽 상단의 지갑 메뉴를 통해서도 사용할 수 있습니다. <0>더 알아보기." @@ -2069,7 +2060,6 @@ msgstr "" msgid "Swap {0} USDG for{1} {2}" msgstr "" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/OrderItem/OrderItem.tsx msgid "{0} will be swapped to {1} on order execution." msgstr "" @@ -2127,8 +2117,6 @@ msgstr "" #: src/components/Exchange/ConfirmationBox.js #: src/components/Exchange/SwapBox.js #: src/components/Exchange/SwapBox.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/SwapCard/SwapCard.tsx #: src/components/Synthetics/SwapCard/SwapCard.tsx msgid "{0} Price" @@ -2237,6 +2225,10 @@ msgstr "시장 평균가 미만 가격" msgid "APRs are updated weekly on Wednesday and will depend on the fees collected for the week." msgstr "APR은 매주 수요일에 업데이트되며 한 주 동안 쌓인 수수료에 따라 달라집니다." +#: src/components/Synthetics/TradeBox/TradeBoxRows/AdvancedDisplayRows.tsx +msgid "Advanced Display" +msgstr "" + #: src/components/Synthetics/SubaccountModal/utils.ts msgid "Generate & Activate Subaccount" msgstr "" @@ -2294,7 +2286,6 @@ msgid "Couldn't find a swap route with enough liquidity" msgstr "" #: src/components/Exchange/ConfirmationBox.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx msgid "Confirm Long" msgstr "롱 포지션 확인" @@ -2345,6 +2336,10 @@ msgstr "GLP로부터 인출가능한 수량. 현재 포지션에 의해 활용 msgid "Invalid price, see warning" msgstr "유효하지 않은 가격, 경고문을 보세요" +#: src/components/Synthetics/TradeBox/hooks/useCollateralInTooltipContent.tsx +msgid "You will be short {indexSymbol} only from your short position." +msgstr "" + #: src/pages/Actions/ActionsV1/ActionsV1.tsx msgid "GMX V1 {networkName} actions for all accounts." msgstr "" @@ -2361,6 +2356,10 @@ msgstr "" msgid "You need to select {swapTokenSymbol} as the \"Pay\" token to use it for collateral to initiate this trade." msgstr "해당 트레이드를 시작하기위해 담보로 {swapTokenSymbol}을 \"지불\" 토큰으로서 선택할 필요가 있습니다." +#: src/components/Synthetics/TradeBox/TradeBoxRows/LimitAndTPSLRows.tsx +msgid "There are issues in the TP/SL orders." +msgstr "" + #: src/components/Glp/GlpSwap.js msgid "The Bonus Rebate is an estimate and will be airdropped as ARB tokens when migrating this liquidity to GM pools within the same epoch. <0>Read more." msgstr "" @@ -2398,9 +2397,12 @@ msgstr "현재 풀 양" msgid "Cancel failed." msgstr "취소 실패" +#: src/components/Synthetics/TradeBox/TradeBoxRows/AvailableLiquidityRow.tsx +msgid "The order will be executed if there is sufficient liquidity and the execution price guarantees that you will receive the minimum receive amount." +msgstr "" + #: src/components/Exchange/ConfirmationBox.js #: src/components/Exchange/PositionSeller.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx msgid "Transacting with a depegged stable coin is subject to spreads reflecting the worse of current market price or $1.00, with transactions involving multiple stablecoins may have multiple spreads." msgstr "" @@ -2445,10 +2447,6 @@ msgstr "마켓 선택" msgid "Open positions: {0}<0/>Under risk: {1}" msgstr "열린 포지션: {0}<0>리스크: {1}" -#: src/components/SubaccountNavigationButton/SubaccountNavigationButton.tsx -msgid "There are insufficient funds in your Subaccount for One-Click Trading. Click here to top-up." -msgstr "" - #: src/components/Exchange/UsefulLinks.tsx msgid "Speed up page loading" msgstr "페이지 로드 속도 향상" @@ -2517,10 +2515,6 @@ msgstr "트레이드" msgid "Adding referral code failed." msgstr "추천 코드 추가 실패" -#: src/components/SubaccountNavigationButton/SubaccountNavigationButton.tsx -msgid "The previously authorized maximum number of Actions has been reached for One-Click Trading. Click here to re-authorize." -msgstr "" - #: src/components/Exchange/PositionEditor.js msgid "Max leverage without PnL: {0}x" msgstr "" @@ -2680,13 +2674,12 @@ msgstr "" #: src/components/Exchange/PositionSeller.js #: src/components/Exchange/SwapBox.js #: src/components/Exchange/SwapBox.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/OrderEditor/OrderEditor.tsx -#: src/components/Synthetics/PositionEditor/PositionEditor.tsx -#: src/components/Synthetics/PositionSeller/PositionSeller.tsx -#: src/components/Synthetics/TradeBox/TradeBox.tsx -#: src/components/Synthetics/TradeBox/TradeBox.tsx +#: src/components/Synthetics/PositionEditor/PositionEditorAdvancedRows.tsx +#: src/components/Synthetics/PositionSeller/PositionSellerAdvancedDisplayRows.tsx #: src/components/Synthetics/TradeBox/TradeBox.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/AdvancedDisplayRows.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/AdvancedDisplayRows.tsx msgid "Leverage" msgstr "레버리지" @@ -2791,10 +2784,6 @@ msgstr "" msgid "Claim failed." msgstr "수령 실패" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -msgid "You have selected {collateralTokenSymbol} as collateral; the liquidation price is higher compared to using a stablecoin as collateral since the worth of the collateral will change with its price. If required and available, you can change the collateral type using the \"Collateral In\" option in the trade box." -msgstr "담보로 {collateralTokenSymbol}을 선택하셨습니다. 담보의 가치는 가격에 따라 변하기 때문에, 안정화토큰을 담보로 사용하는 것보다 청산가격이 높습니다. 필요하다면, 트레이드 박스의 \"담보자산\" 옵션을 사용하여 담보 유형을 변경할 수 있습니다." - #: src/components/Synthetics/Claims/SettleAccruedCard.tsx msgid "Accrued Price Impact Rebates. They will become Claimable after some time.<0/><1/><2>Read more." msgstr "" @@ -2861,10 +2850,6 @@ msgstr "" msgid "GM can be sold for {0} and {1} for this market up to the specified selling caps. The remaining tokens in the pool are reserved for currently open positions." msgstr "" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -msgid "Collateral value may differ due to different Price Impact at the time of execution." -msgstr "" - #: src/components/Synthetics/ExecutionPriceRow.tsx #: src/components/Synthetics/TradeHistory/TradeHistoryRow/utils/position.ts #: src/components/Synthetics/TradeHistory/TradeHistoryRow/utils/position.ts @@ -2967,6 +2952,10 @@ msgstr "Arbitrum에서 GMX로 베스팅하기" msgid "{longOrShort} positions {fundingAction} a funding fee of {fundingRate} per hour and {borrowAction} a borrow fee of {borrowRate} per hour." msgstr "" +#: src/components/Synthetics/TradeBox/TradeBoxRows/LimitAndTPSLRows.tsx +msgid "Limit / TP / SL" +msgstr "" + #: src/components/Exchange/OrderEditor.js #: src/components/Synthetics/OrderEditor/OrderEditor.tsx msgid "Updating Order..." @@ -3029,8 +3018,8 @@ msgstr "거래가 아직 없습니다" #: src/components/Exchange/ConfirmationBox.js #: src/components/Exchange/PositionSeller.js #: src/components/SettingsModal/SettingsModal.tsx -#: src/components/Synthetics/ConfirmationBox/rows/AllowedSlippageRow.tsx #: src/components/Synthetics/PositionSeller/rows/AllowedSlippageRow.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/AllowedSlippageRow.tsx msgid "Allowed Slippage" msgstr "허용 가능한 슬리피지" @@ -3147,12 +3136,11 @@ msgstr "스왑 제출 완료." #: src/components/Exchange/PositionSeller.js #: src/components/Exchange/PositionsList.js #: src/components/Exchange/TradeHistory.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/PositionItem/PositionItem.tsx #: src/components/Synthetics/PositionItem/PositionItem.tsx -#: src/components/Synthetics/PositionSeller/PositionSeller.tsx -#: src/components/Synthetics/PositionSeller/PositionSeller.tsx -#: src/components/Synthetics/TradeBox/TradeBox.tsx +#: src/components/Synthetics/PositionSeller/PositionSellerAdvancedDisplayRows.tsx +#: src/components/Synthetics/PositionSeller/PositionSellerAdvancedDisplayRows.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/AdvancedDisplayRows.tsx #: src/components/Synthetics/TradeHistory/TradeHistoryRow/utils/position.ts #: src/pages/AccountDashboard/DailyAndCumulativePnL.tsx #: src/pages/Actions/ActionsV1/ActionsV1.tsx @@ -3176,6 +3164,7 @@ msgstr "" #: src/components/Exchange/PositionEditor.js #: src/components/Exchange/PositionEditor.js #: src/components/Synthetics/PositionEditor/PositionEditor.tsx +#: src/components/Synthetics/PositionEditor/types.ts #: src/components/Synthetics/SubaccountModal/SubaccountModal.tsx #: src/components/Synthetics/TradeHistory/keys.ts #: src/pages/Stake/StakeV2.tsx @@ -3261,8 +3250,8 @@ msgstr "해당 포지션은 최대 슬리피지 {1}%의 {0} USD에서 열리게 msgid "Active Referral Code" msgstr "활성화된 추천 코드" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/PositionEditor/PositionEditor.tsx +#: src/components/Synthetics/TradeBox/hooks/useTradeWarningsRows.tsx msgid "Pending {0} approval" msgstr "" @@ -3274,6 +3263,10 @@ msgstr "네트워크를 Arbitrum으로 변경해주세요." msgid "The position would be immediately liquidated upon order execution. Try reducing the size." msgstr "" +#: src/components/Synthetics/TradeBox/TradeBoxRows/OneClickTrading.tsx +msgid "Enable" +msgstr "" + #: src/components/Synthetics/GmList/GmList.tsx #: src/components/Synthetics/MarketTokenSelector/MarketTokenSelector.tsx msgid "BUYABLE" @@ -3305,6 +3298,10 @@ msgstr "" msgid "You have yet to reach the minimum \"Capital Used\" of {0} to qualify for the rankings." msgstr "" +#: src/components/Synthetics/TradeBox/TradeBoxRows/LimitPriceRow.tsx +msgid "The execution price for the limit order updates in real-time on the orders tab after order creation to guarantee that you receive the minimum receive amount." +msgstr "" + #: src/components/Exchange/SwapBox.js msgid "Swap amount exceeds Available Liquidity." msgstr "" @@ -3326,8 +3323,8 @@ msgstr "이전" msgid "Unknown buy GM order" msgstr "" -#: src/components/Synthetics/ConfirmationBox/rows/AllowedSlippageRow.tsx #: src/components/Synthetics/PositionSeller/rows/AllowedSlippageRow.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/AllowedSlippageRow.tsx msgid "You can edit the default Allowed Slippage in the settings menu on the top right of the page.<0/><1/>Note that a low allowed slippage, e.g. less than -{0}, may result in failed orders if prices are volatile." msgstr "" @@ -3363,7 +3360,7 @@ msgstr "보상" #: src/components/Exchange/SwapBox.js #: src/components/Synthetics/CollateralSelector/CollateralSelector.tsx #: src/components/Synthetics/CollateralSelector/CollateralSelector.tsx -#: src/components/Synthetics/TradeBox/CollateralSelectorRow.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/CollateralSelectorRow.tsx msgid "Collateral In" msgstr "담보 자산" @@ -3383,8 +3380,8 @@ msgstr "트레이딩 가이드" msgid "TRADING Airdrop" msgstr "" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -msgid "Limit Order Price to guarantee Min. Receive amount is updated in real time in the Orders tab after the order has been created." +#: src/components/Synthetics/TradeBox/hooks/useCollateralInTooltipContent.tsx +msgid "You will be short {indexSymbol} from your short position, while being long {collateralSymbol} from your {collateralSymbol} collateral. This can be useful for delta-neutral strategies to earn funding fees." msgstr "" #: src/components/Referrals/TradersStats.tsx @@ -3445,8 +3442,8 @@ msgstr "" msgid "The Execution Price didn't meet the Acceptable Price condition. The Order will get filled when the condition is met." msgstr "실행 가격이 허용 가능한 가격 조건을 충족하지 않았습니다. 조건이 충족되면 주문이 체결됩니다." -#: src/components/Synthetics/PositionEditor/PositionEditor.tsx -#: src/components/Synthetics/PositionSeller/PositionSeller.tsx +#: src/components/Synthetics/PositionEditor/PositionEditorAdvancedRows.tsx +#: src/components/Synthetics/PositionSeller/PositionSellerAdvancedDisplayRows.tsx msgid "Initial Collateral (Collateral excluding Borrow and Funding Fee)." msgstr "" @@ -3466,15 +3463,15 @@ msgstr "구조화금융 프로덕트" #: src/components/AprInfo/AprInfo.tsx #: src/components/AprInfo/AprInfo.tsx #: src/components/Synthetics/AcceptablePriceImpactInputRow/AcceptablePriceImpactInputRow.tsx -#: src/components/Synthetics/PositionSeller/PositionSeller.tsx -#: src/components/Synthetics/TradeBox/TradeBox.tsx +#: src/components/Synthetics/PositionSeller/PositionSellerAdvancedDisplayRows.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/AdvancedDisplayRows.tsx #: src/pages/LeaderboardPage/components/LeaderboardAccountsTable.tsx #: src/pages/LeaderboardPage/components/LeaderboardPositionsTable.tsx #: src/pages/LeaderboardPage/components/LeaderboardPositionsTable.tsx msgid "NA" msgstr "" -#: src/components/Synthetics/TradeBox/CollateralSelectorRow.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/CollateralSelectorRow.tsx msgid "You have an existing position with {0} as collateral. This action will not apply for that position. <0>Switch to {1} collateral." msgstr "" @@ -3511,10 +3508,6 @@ msgstr "주문의 트리거 가격입니다." #: src/components/Synthetics/Claims/ClaimHistoryRow/ClaimFundingFeesHistoryRow.tsx #: src/components/Synthetics/Claims/ClaimHistoryRow/ClaimFundingFeesHistoryRow.tsx #: src/components/Synthetics/Claims/ClaimsHistory.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/MarketCard/MarketCard.tsx #: src/components/Synthetics/MarketNetFee/MarketNetFee.tsx #: src/components/Synthetics/PositionEditor/PositionEditor.tsx @@ -3587,8 +3580,6 @@ msgstr "" #: src/components/Exchange/PositionsList.js #: src/components/Exchange/PositionsList.js #: src/components/Exchange/SwapBox.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/OrderEditor/OrderEditor.tsx #: src/components/Synthetics/PositionEditor/PositionEditor.tsx #: src/components/Synthetics/PositionItem/PositionItem.tsx @@ -3659,10 +3650,6 @@ msgstr "GMX에서 트레이드하고 <0>$250.000 상금을 획득하세요! msgid "You are leaving GMX.io and will be redirected to a third party, independent website." msgstr "귀하는 GMX.io 페이지를 벗어나, 써드파티 웹사이트로 리다이렉트되고 있습니다." -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -msgid "You have selected {collateralTokenSymbol} as collateral to short {indexTokenSymbol}." -msgstr "" - #: src/components/Synthetics/PositionItem/PositionItem.tsx #: src/components/Synthetics/PositionItem/PositionItem.tsx msgid "Accrued Borrow Fee" @@ -3698,10 +3685,10 @@ msgstr "" msgid "<0>Notifications are provided by Notifi and not affiliated with GMX. By subscribing, you agree that info you provide to Notifi will be governed by its <1>Privacy Policy<2> and <3>Terms of Use." msgstr "" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/GmSwap/GmConfirmationBox/GmConfirmationBox.tsx #: src/components/Synthetics/PositionEditor/PositionEditor.tsx #: src/components/Synthetics/PositionSeller/PositionSeller.tsx +#: src/components/Synthetics/TradeBox/hooks/useTradeWarningsRows.tsx msgid "High Network Fee not yet acknowledged" msgstr "" @@ -3742,11 +3729,6 @@ msgstr "" msgid "UI Fee" msgstr "" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -msgid "Confirm {0} Order" -msgstr "" - #: src/domain/synthetics/orders/simulateExecuteOrderTxn.tsx #: src/domain/synthetics/orders/simulateExecuteOrderTxn.tsx msgid "Execute order simulation failed." @@ -3791,9 +3773,10 @@ msgstr "" #: src/components/Exchange/ConfirmationBox.js #: src/components/Exchange/PositionSeller.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/PositionEditor/PositionEditor.tsx #: src/components/Synthetics/PositionSeller/PositionSeller.tsx +#: src/components/Synthetics/TradeBox/hooks/useTradeButtonState.tsx +#: src/components/Synthetics/TradeBox/TradeBox.tsx msgid "Creating Order..." msgstr "주문 생성중..." @@ -4058,7 +4041,6 @@ msgstr "감소 완료" #: src/components/Exchange/OrdersList.js #: src/components/Exchange/TradeHistory.js #: src/components/Exchange/TradeHistory.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/domain/synthetics/orders/utils.tsx #: src/pages/OrdersOverview/OrdersOverview.js msgid "Decrease" @@ -4093,11 +4075,15 @@ msgstr "12월" msgid "GMX Weekly Updates" msgstr "GMX 주간 업데이트" +#: src/components/Synthetics/TradeBox/hooks/useCollateralInTooltipContent.tsx +msgid "You will be long {indexSymbol} only from your long position." +msgstr "" + #: src/pages/OrdersOverview/OrdersOverview.js msgid "Total active: {openTotal}, executed: {executedTotal}, cancelled: {cancelledTotal}" msgstr "전체 액티브: {openTotal}, 실행 완료: {executedTotal}, 취소 완료: {cancelledTotal}" -#: src/components/Synthetics/TradeBox/CollateralSelectorRow.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/CollateralSelectorRow.tsx msgid "You have an existing order with {symbol} as collateral. <0>Switch to {symbol} collateral." msgstr "" @@ -4132,7 +4118,7 @@ msgstr "" msgid "Yield simulator for GMX" msgstr "GMX를 위한 일드 시뮬레이터" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/AvailableLiquidityRow.tsx msgid "There may not be sufficient liquidity to execute your order when the Min. Receive are met." msgstr "" @@ -4178,9 +4164,9 @@ msgstr "" #: src/components/Exchange/SwapBox.js #: src/components/Exchange/SwapBox.js #: src/components/Exchange/SwapBox.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/MarketCard/MarketCard.tsx #: src/components/Synthetics/SwapCard/SwapCard.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/AvailableLiquidityRow.tsx msgid "Available Liquidity" msgstr "사용가능 유동성" @@ -4269,12 +4255,9 @@ msgstr "" #: src/components/Exchange/ConfirmationBox.js #: src/components/Exchange/PositionEditor.js #: src/components/Exchange/PositionSeller.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/PositionEditor/PositionEditor.tsx -#: src/components/Synthetics/PositionSeller/PositionSeller.tsx -#: src/components/Synthetics/TradeBox/TradeBox.tsx +#: src/components/Synthetics/PositionEditor/PositionEditorAdvancedRows.tsx +#: src/components/Synthetics/PositionSeller/PositionSellerAdvancedDisplayRows.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/AdvancedDisplayRows.tsx msgid "Collateral ({0})" msgstr "담보 ({0})" @@ -4286,6 +4269,14 @@ msgstr "" msgid "Order updated!" msgstr "주문 업데이트됨!" +#: src/components/Synthetics/TradeBox/hooks/useCollateralInTooltipContent.tsx +msgid "You will be short {indexSymbol} from your short position, while being long {collateralSymbol} from your {collateralSymbol} collateral. The liquidation price will vary based on the price of {collateralSymbol}." +msgstr "" + +#: src/components/Synthetics/TradeBox/TradeBoxRows/OneClickTrading.tsx +msgid "The previously authorized maximum number of actions has been reached for One-Click Trading." +msgstr "" + #: src/components/Synthetics/CollateralSelector/CollateralSelector.tsx #: src/components/Synthetics/CollateralSelector/CollateralSelector.tsx msgid "Select a pool containing {0} to use it as collateral." @@ -4324,7 +4315,6 @@ msgid "Max Leverage without PnL: 100x" msgstr "" #: src/components/Exchange/ConfirmationBox.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx msgid "Confirm Short" msgstr "숏 포지션 확인" @@ -4340,10 +4330,6 @@ msgstr "" msgid "Order Type" msgstr "" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -msgid "Decrease size" -msgstr "" - #: src/components/Synthetics/StatusNotification/GmStatusNotification.tsx msgid "Sell order executed" msgstr "" @@ -4360,13 +4346,9 @@ msgstr "" msgid "Affiliate Rewards Claimed" msgstr "" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -msgid "Old Collateral" -msgstr "" - #: src/components/Exchange/ConfirmationBox.js #: src/components/Exchange/PositionSeller.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/SwapSpreadRow.tsx msgid "Spread" msgstr "스프레드" @@ -4402,6 +4384,10 @@ msgstr "로딩중..." msgid "Leaderboard for GMX traders" msgstr "GMX 트레이더를 위한 리더보드" +#: src/components/Synthetics/TradeBox/TradeBoxRows/OneClickTrading.tsx +msgid "There are insufficient funds in your subaccount for One-Click Trading" +msgstr "" + #: src/components/Exchange/PositionsList.js msgid "Share" msgstr "공유" @@ -4546,7 +4532,7 @@ msgstr "" msgid "GLP autocompounding vaults" msgstr "" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx +#: src/components/Synthetics/TradeBox/hooks/useTradeButtonState.tsx msgid "TP/SL orders exceed the position" msgstr "" @@ -4575,7 +4561,7 @@ msgstr "포지션을 닫을 때, 어떤 토큰으로 이익을 수취할 지 선 msgid "Top PnL (%)" msgstr "" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/AvailableLiquidityRow.tsx #: src/domain/synthetics/orders/utils.tsx msgid "There may not be sufficient liquidity to execute your order when the price conditions are met." msgstr "" @@ -4774,7 +4760,7 @@ msgstr "" msgid "Begin Transfer" msgstr "전송시작" -#: src/components/SubaccountNavigationButton/SubaccountNavigationButton.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/OneClickTrading.tsx msgid "One-Click Trading is not available for wrapping or unwrapping native token {0}." msgstr "" @@ -4823,7 +4809,7 @@ msgstr "" msgid "Cancel" msgstr "취소" -#: src/components/Synthetics/ConfirmationBox/SideOrderEntries.tsx +#: src/components/Synthetics/TradeBox/components/SideOrderEntries.tsx msgid "Remove Row" msgstr "" @@ -4849,10 +4835,6 @@ msgstr "주문이 취소되었습니다." msgid "Buy or Transfer AVAX to Avalanche" msgstr "" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -msgid "You have selected {collateralTokenSymbol} as Collateral, the Liquidation Price will vary based on the price of {collateralTokenSymbol}." -msgstr "" - #: src/pages/Ecosystem/Ecosystem.js msgid "Telegram bot for Open Interest on GMX" msgstr "GMX 미결제약정을 위한 텔레그램 봇" @@ -4903,7 +4885,7 @@ msgstr "" msgid "Enter new amount or price" msgstr "" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/LimitAndTPSLRows.tsx msgid "Stop-Loss PnL" msgstr "" @@ -5034,7 +5016,7 @@ msgstr "귀하가 추천한 트레이더들의 거래량" msgid "Stablecoin Percentage" msgstr "스테이블코인 비율" -#: src/components/Synthetics/TradeBox/CollateralSelectorRow.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/CollateralSelectorRow.tsx msgid "You have an existing position with {0} as collateral. This Order will not be valid for that Position. <0>Switch to {1} collateral." msgstr "" @@ -5269,6 +5251,10 @@ msgstr "" msgid "Claim esGMX" msgstr "esGMX 수령하기" +#: src/components/Synthetics/TradeBox/TradeBoxRows/OneClickTrading.tsx +msgid "Re-authorize" +msgstr "" + #: src/pages/BuyGMX/BuyGMX.tsx msgid "Buy or Transfer ETH to Arbitrum" msgstr "" @@ -5449,10 +5435,6 @@ msgstr "" msgid "Max Out" msgstr "" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -msgid "The order will only execute if the Min. Receive is met and there is sufficient liquidity." -msgstr "" - #: src/components/Exchange/PositionEditor.js #: src/components/Exchange/PositionSeller.js #: src/components/Exchange/PositionSeller.js @@ -5677,7 +5659,7 @@ msgstr "" msgid "{0} and {1} can be used to buy GM for this market up to the specified buying caps." msgstr "" -#: src/components/SubaccountNavigationButton/SubaccountNavigationButton.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/OneClickTrading.tsx msgid "One-Click Trading is not available using network's native token {0}. Consider using {1} instead." msgstr "" @@ -5755,8 +5737,7 @@ msgstr "" #: src/components/Exchange/ConfirmationBox.js #: src/components/Exchange/ConfirmationBox.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/LimitPriceRow.tsx msgid "Limit Price" msgstr "지정가" @@ -5780,6 +5761,7 @@ msgstr "{0} {longOrShortText}의 입글을 실행시키지 못했습니다" #: src/components/Exchange/PositionEditor.js #: src/components/Exchange/PositionEditor.js #: src/components/Synthetics/PositionEditor/PositionEditor.tsx +#: src/components/Synthetics/PositionEditor/types.ts #: src/components/Synthetics/TradeHistory/keys.ts #: src/pages/Stake/StakeV2.tsx #: src/pages/Stake/StakeV2.tsx @@ -5815,10 +5797,6 @@ msgstr "레버리지 유효화중" msgid "There may not be sufficient liquidity to execute the swap to the receive token when the price conditions are met." msgstr "" -#: src/components/SubaccountNavigationButton/SubaccountNavigationButton.tsx -msgid "Enable One-Click Trading" -msgstr "" - #: src/components/NotifyModal/NotifyModal.tsx msgid "Trade Errors" msgstr "" @@ -5842,8 +5820,6 @@ msgstr "" #: src/components/Exchange/SwapBox.js #: src/components/Glp/GlpSwap.js #: src/components/Glp/GlpSwap.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/GmSwap/GmConfirmationBox/GmConfirmationBox.tsx #: src/components/Synthetics/GmSwap/GmConfirmationBox/GmConfirmationBox.tsx #: src/components/Synthetics/GmSwap/GmSwapBox/GmSwapBox.tsx @@ -5911,9 +5887,9 @@ msgstr "" msgid "There are insufficient funds in your Subaccount for One-Click Trading. <0>Click here to top-up." msgstr "" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx +#: src/components/Synthetics/TradeBox/hooks/useTradeboxTransactions.tsx +#: src/components/Synthetics/TradeBox/hooks/useTradeboxTransactions.tsx +#: src/components/Synthetics/TradeBox/hooks/useTradeboxTransactions.tsx msgid "Error submitting order" msgstr "" @@ -6009,10 +5985,6 @@ msgstr "" msgid "Rebates" msgstr "" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -msgid "The spread is > 1%, please ensure the trade details are acceptable before comfirming" -msgstr "" - #: src/components/Glp/GlpSwap.js msgid "Sell failed." msgstr "판매 실패" @@ -6046,7 +6018,7 @@ msgstr "" msgid "Date" msgstr "날짜" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx +#: src/components/Synthetics/TradeBox/hooks/useTradeWarningsRows.tsx #: src/domain/synthetics/trade/utils/validation.ts #: src/domain/synthetics/trade/utils/validation.ts #: src/domain/synthetics/trade/utils/validation.ts @@ -6086,7 +6058,6 @@ msgid "Price above Mark Price" msgstr "시장 평균가 초과 가격" #: src/components/Exchange/PositionSeller.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/OrderItem/OrderItem.tsx #: src/components/Synthetics/OrderList/OrderList.tsx #: src/components/Synthetics/PositionSeller/PositionSeller.tsx @@ -6167,7 +6138,7 @@ msgstr "" msgid "The amount left in the subaccount is not enough to cover network gas costs." msgstr "" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/LimitAndTPSLRows.tsx msgid "Take-Profit PnL" msgstr "" @@ -6408,10 +6379,6 @@ msgstr "" #: src/components/Synthetics/Claims/ClaimHistoryRow/ClaimFundingFeesHistoryRow.tsx #: src/components/Synthetics/Claims/ClaimHistoryRow/ClaimFundingFeesHistoryRow.tsx #: src/components/Synthetics/Claims/ClaimsHistory.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/MarketCard/MarketCard.tsx #: src/components/Synthetics/MarketNetFee/MarketNetFee.tsx #: src/components/Synthetics/PositionEditor/PositionEditor.tsx @@ -6554,7 +6521,6 @@ msgid "Failed Settlement of Funding Fees" msgstr "" #: src/components/Exchange/ConfirmationBox.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx msgid "Pay Amount" msgstr "지불액" @@ -6624,7 +6590,7 @@ msgstr "" msgid "{ordersText} cancelled" msgstr "" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx +#: src/components/Synthetics/TradeBox/hooks/useTradeButtonState.tsx msgid "Limit price below Mark Price" msgstr "" @@ -6649,7 +6615,7 @@ msgid "Transaction was cancelled." msgstr "트랜잭션 실패됨." #: src/components/Exchange/ConfirmationBox.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx +#: src/components/Synthetics/TradeBox/hooks/useTradeButtonState.tsx msgid "Accept confirmation of trigger orders" msgstr "트리거 주문의 확인에 동의해주세요" @@ -6920,10 +6886,6 @@ msgstr "{sender}로부터 보류중인 전송이 있습니다." msgid "Enter a trigger price" msgstr "" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -msgid "Limit Order Price will vary based on Fees and Price Impact to guarantee the Min. Receive amount." -msgstr "" - #: src/pages/BeginAccountTransfer/BeginAccountTransfer.tsx msgid "Vested GLP not withdrawn" msgstr "베스트팅된 GLP에서 인출되지 않은 양" @@ -6935,11 +6897,9 @@ msgstr "베스트팅된 GLP에서 인출되지 않은 양" #: src/components/Exchange/PositionsList.js #: src/components/Exchange/SwapBox.js #: src/components/Exchange/SwapBox.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/PositionEditor/PositionEditor.tsx #: src/components/Synthetics/PositionItem/PositionItem.tsx #: src/components/Synthetics/PositionList/PositionList.tsx -#: src/components/Synthetics/TradeBox/TradeBox.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/EntryPriceRow.tsx #: src/pages/LeaderboardPage/components/LeaderboardPositionsTable.tsx msgid "Entry Price" msgstr "진입 가격" @@ -6962,6 +6922,7 @@ msgstr "" #: src/components/AddressDropdown/AddressDropdown.tsx #: src/components/Synthetics/SubaccountModal/SubaccountModal.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/OneClickTrading.tsx msgid "One-Click Trading" msgstr "" @@ -7025,11 +6986,10 @@ msgid "SELL…" msgstr "" #: src/components/Exchange/ConfirmationBox.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx msgid "Confirm Swap" msgstr "스왑 확인" -#: src/components/Synthetics/PositionSeller/PositionSeller.tsx +#: src/components/Synthetics/PositionSeller/PositionSellerAdvancedDisplayRows.tsx msgid "Keep leverage is not available as Position exceeds max. allowed leverage. <0>Read more." msgstr "" @@ -7093,6 +7053,10 @@ msgstr "" msgid "<0>The APY is an estimate based on the fees collected for the past seven days, extrapolating the current borrowing fee. It excludes:<1><2>price changes of the underlying token(s)<3>traders' PnL, which is expected to be neutral in the long term<4>funding fees, which are exchanged between traders<5><6>Read more about GM token pricing.<7>Check GM pools' performance against other LP Positions in the <8>GMX Dune Dashboard." msgstr "" +#: src/components/Synthetics/TradeBox/TradeBoxRows/OneClickTrading.tsx +msgid "Top-Up" +msgstr "" + #: src/components/Synthetics/MarketCard/MarketCard.tsx msgid "Ask Price (Exit)" msgstr "" @@ -7105,6 +7069,10 @@ msgstr "" msgid "Orders ({ordersCount})" msgstr "" +#: src/components/Synthetics/TradeBox/hooks/useCollateralInTooltipContent.tsx +msgid "You will be long {indexSymbol} from your long position, as well as from your {collateralSymbol} collateral. The liquidation price is higher compared to using a stablecoin as collateral since the worth of the collateral will change with its price." +msgstr "" + #: src/pages/Ecosystem/Ecosystem.js msgid "GMX explorer for stats and traders" msgstr "통계와 트레이드 정보를 위한 GMX 익스플로러" @@ -7150,7 +7118,7 @@ msgstr "" msgid "Fee values do not include incentives." msgstr "" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx +#: src/components/Synthetics/TradeBox/hooks/useTradeButtonState.tsx msgid "Limit price above Mark Price" msgstr "" @@ -7166,7 +7134,6 @@ msgstr "" #: src/components/Exchange/SwapBox.js #: src/components/Exchange/SwapBox.js #: src/components/Exchange/SwapBox.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/OrderList/filters/OrderTypeFilter.tsx #: src/components/Synthetics/StatusNotification/OrderStatusNotification.tsx #: src/components/Synthetics/SwapCard/SwapCard.tsx @@ -7328,10 +7295,8 @@ msgstr "" #: src/components/Exchange/PositionSeller.js #: src/components/Exchange/PositionsList.js #: src/components/Exchange/PositionsList.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/OrderItem/OrderItem.tsx #: src/components/Synthetics/OrderList/OrderList.tsx -#: src/components/Synthetics/PositionEditor/PositionEditor.tsx #: src/components/Synthetics/PositionItem/PositionItem.tsx #: src/components/Synthetics/PositionList/PositionList.tsx #: src/components/Synthetics/TradeHistory/useDownloadAsCsv.tsx @@ -7438,7 +7403,7 @@ msgid "short" msgstr "" #: src/components/Exchange/ConfirmationBox.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx +#: src/components/Synthetics/TradeBox/hooks/useTriggerOrdersConsent.tsx msgid "I am aware of the trigger orders" msgstr "트리거 주문에 대해 충분히 인지하고 있습니다." @@ -7483,12 +7448,12 @@ msgstr "주문 체결 가격" #: src/components/Exchange/ConfirmationBox.js #: src/components/Exchange/PositionSeller.js -#: src/components/Synthetics/ConfirmationBox/rows/AllowedSlippageRow.tsx #: src/components/Synthetics/PositionSeller/rows/AllowedSlippageRow.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/AllowedSlippageRow.tsx msgid "Slippage is too high" msgstr "" -#: src/components/Synthetics/ConfirmationBox/SideOrderEntries.tsx +#: src/components/Synthetics/TradeBox/components/SideOrderEntries.tsx msgid "Add Row" msgstr "" @@ -7543,12 +7508,12 @@ msgstr "" #: src/components/Exchange/OrdersList.js #: src/components/Exchange/OrdersList.js #: src/components/Exchange/SwapBox.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/OrderEditor/OrderEditor.tsx #: src/components/Synthetics/OrderItem/OrderItem.tsx #: src/components/Synthetics/OrderList/filters/OrderTypeFilter.tsx #: src/components/Synthetics/PositionItem/PositionItem.tsx #: src/components/Synthetics/TradeBox/TradeBox.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/LimitAndTPSLRows.tsx #: src/components/Synthetics/TradeHistory/keys.ts msgid "Limit" msgstr "지정가" @@ -7571,7 +7536,6 @@ msgid "<0>Insufficient liquidity to execute the order<1>The mark price which msgstr "<0>주문을 체결하기 위한 유동성이 부족합니다<1>시장 평균가가 지정된 가격에 도달하지 않았습니다<2>지정된 가격에 도달했지만 실행하기에 충분한 시간이 지나지 않았습니다주문을 체결할 수 있는 키퍼가 없습니다.<3>" #: src/components/Exchange/ConfirmationBox.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx msgid "Your position's collateral after deducting fees:" msgstr "수수료를 제외한 귀하의 포지션 담보입니다:" @@ -7621,8 +7585,8 @@ msgstr "" msgid "01 Sep 2021" msgstr "2021년 9월 1일" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/OrderList/filters/OrderTypeFilter.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/LimitAndTPSLRows.tsx #: src/domain/synthetics/positions/utils.ts msgid "Take-Profit" msgstr "" diff --git a/src/locales/pseudo/messages.po b/src/locales/pseudo/messages.po index 5fb32435ba..c6ed5f0df0 100644 --- a/src/locales/pseudo/messages.po +++ b/src/locales/pseudo/messages.po @@ -79,7 +79,6 @@ msgid "Subaccount generation failed" msgstr "" #: src/components/Exchange/ConfirmationBox.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx msgid "{existingTriggerOrderLength, plural, one {You have an active trigger order that might execute immediately after you open this position. Please cancel the order or accept the confirmation to continue.} other {You have # active trigger orders that might execute immediately after you open this position. Please cancel the orders or accept the confirmation to continue.}}" msgstr "" @@ -155,6 +154,10 @@ msgstr "" msgid "Withdrawal error." msgstr "" +#: src/components/Synthetics/TradeBox/TradeBox.tsx +msgid "The execution price will constantly vary based on fees and price impact to guarantee that you receive the minimum receive amount." +msgstr "" + #: src/pages/Home/Home.js msgid "Decentralized<0/>Perpetual Exchange" msgstr "" @@ -236,7 +239,6 @@ msgstr "" #: src/components/Glp/GlpSwap.js #: src/components/Glp/GlpSwap.js #: src/components/Glp/GlpSwap.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/OrderEditor/OrderEditor.tsx #: src/components/Synthetics/TradeFeesRow/TradeFeesRow.tsx msgid "Fees" @@ -403,8 +405,6 @@ msgid "Insufficient liquidity in the {0} market pool. Select a different pool fo msgstr "" #: src/components/Exchange/ConfirmationBox.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx msgid "Confirm Limit Order" msgstr "" @@ -515,6 +515,7 @@ msgstr "" msgid "Incentives are airdropped weekly." msgstr "" +#: src/components/Synthetics/AcceptablePriceImpactInputRow/AcceptablePriceImpactInputRow.tsx #: src/components/Synthetics/AcceptablePriceImpactInputRow/AcceptablePriceImpactInputRow.tsx msgid "Acceptable Price Impact" msgstr "" @@ -527,10 +528,6 @@ msgstr "" msgid "Insufficient staked tokens" msgstr "" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -msgid "New Collateral" -msgstr "" - #: src/lib/wallets/connecters/binanceW3W/binanceWallet.ts msgid "Tap [Create Wallet] to start using your Web3 Wallet." msgstr "" @@ -721,8 +718,6 @@ msgstr "" #: src/components/Exchange/SwapBox.js #: src/components/Glp/GlpSwap.js #: src/components/Glp/GlpSwap.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/GmSwap/GmConfirmationBox/GmConfirmationBox.tsx #: src/components/Synthetics/GmSwap/GmConfirmationBox/GmConfirmationBox.tsx #: src/components/Synthetics/GmSwap/GmSwapBox/GmSwapBox.tsx @@ -747,8 +742,8 @@ msgstr "" msgid "Decentralized Money Market" msgstr "" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/OrderList/filters/OrderTypeFilter.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/LimitAndTPSLRows.tsx #: src/domain/synthetics/positions/utils.ts msgid "Stop-Loss" msgstr "" @@ -774,10 +769,6 @@ msgstr "" msgid "Buy with {0}" msgstr "" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -msgid "You have an existing position with {0} as collateral. This Order will not be valid for that Position." -msgstr "" - #: src/components/Referrals/JoinReferralCode.js msgid "Adding..." msgstr "" @@ -891,8 +882,8 @@ msgid "Unstake completed!" msgstr "" #: src/components/Exchange/ConfirmationBox.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/OrderEditor/OrderEditor.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/MinReceiveRow.tsx msgid "Min. Receive" msgstr "" @@ -931,8 +922,6 @@ msgstr "" #: src/components/Exchange/OrdersList.js #: src/components/Exchange/PositionsList.js #: src/components/Exchange/PositionsList.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/MarketStats/MarketStats.tsx #: src/components/Synthetics/OrderItem/OrderItem.tsx #: src/components/Synthetics/PositionItem/PositionItem.tsx @@ -1191,8 +1180,7 @@ msgstr "" msgid "account" msgstr "" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/TradeBox/TradeBox.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/AdvancedDisplayRows.tsx msgid "Keep leverage at {0}" msgstr "" @@ -1299,6 +1287,10 @@ msgstr "" msgid "Select Positions" msgstr "" +#: src/components/Synthetics/TradeBox/hooks/useCollateralInTooltipContent.tsx +msgid "You will be long {indexSymbol} from your long position, while being long {collateralSymbol} from your {collateralSymbol} collateral. The liquidation price will vary based on the price of {collateralSymbol}." +msgstr "" + #: src/components/Referrals/AffiliatesStats.tsx #: src/components/Referrals/AffiliatesStats.tsx #: src/components/Referrals/TradersStats.tsx @@ -1552,7 +1544,7 @@ msgstr "" msgid "Mark" msgstr "" -#: src/components/Synthetics/PositionSeller/PositionSeller.tsx +#: src/components/Synthetics/PositionSeller/PositionSellerAdvancedDisplayRows.tsx msgid "Keep leverage at {keepLeverageAtValue}" msgstr "" @@ -1708,7 +1700,7 @@ msgstr "" msgid "GM Pools" msgstr "" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/AvailableLiquidityRow.tsx msgid "The order will only execute if the price conditions are met and there is sufficient liquidity." msgstr "" @@ -1747,16 +1739,14 @@ msgstr "" #: src/components/Exchange/PositionsList.js #: src/components/Synthetics/Claims/ClaimsHistory.tsx #: src/components/Synthetics/Claims/ClaimsHistory.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/OrderEditor/OrderEditor.tsx #: src/components/Synthetics/OrderItem/OrderItem.tsx #: src/components/Synthetics/OrderList/OrderList.tsx -#: src/components/Synthetics/PositionEditor/PositionEditor.tsx +#: src/components/Synthetics/PositionEditor/PositionEditorAdvancedRows.tsx #: src/components/Synthetics/PositionItem/PositionItem.tsx #: src/components/Synthetics/PositionList/PositionList.tsx -#: src/components/Synthetics/PositionSeller/PositionSeller.tsx -#: src/components/Synthetics/TradeBox/TradeBox.tsx +#: src/components/Synthetics/PositionSeller/PositionSellerAdvancedDisplayRows.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/AdvancedDisplayRows.tsx #: src/components/Synthetics/TradeHistory/TradeHistory.tsx #: src/components/Synthetics/TradeHistory/useDownloadAsCsv.tsx #: src/pages/LeaderboardPage/components/LeaderboardPositionsTable.tsx @@ -1894,6 +1884,11 @@ msgstr "" msgid "{0} Approved!" msgstr "" +#: src/components/Synthetics/PositionEditor/PositionEditorAdvancedRows.tsx +#: src/components/Synthetics/PositionSeller/PositionSellerAdvancedDisplayRows.tsx +msgid "Advanced display" +msgstr "" + #: src/components/Exchange/SwapBox.js msgid "Long {0}" msgstr "" @@ -1917,7 +1912,7 @@ msgid "Total Trading Volume" msgstr "" #: src/components/Exchange/ConfirmationBox.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/CollateralSpreadRow.tsx msgid "Collateral Spread" msgstr "" @@ -2001,10 +1996,6 @@ msgstr "" msgid "Allow {0} to be spent" msgstr "" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -msgid "You have an existing position with {0} as collateral. This action will not apply for that position." -msgstr "" - #: src/components/Exchange/SwapBox.js msgid "Swap Order created!" msgstr "" @@ -2053,7 +2044,7 @@ msgstr "" msgid "{existingTriggerOrderLength, plural, one {You have an active trigger order that could impact this position.} other {You have # active trigger orders that could impact this position.}}" msgstr "" -#: src/components/SubaccountNavigationButton/SubaccountNavigationButton.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/OneClickTrading.tsx msgid "Reduce wallet signing popups with One-Click Trading. This option is also available through the Wallet menu in the top right. <0>Read more." msgstr "" @@ -2069,7 +2060,6 @@ msgstr "" msgid "Swap {0} USDG for{1} {2}" msgstr "" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/OrderItem/OrderItem.tsx msgid "{0} will be swapped to {1} on order execution." msgstr "" @@ -2127,8 +2117,6 @@ msgstr "" #: src/components/Exchange/ConfirmationBox.js #: src/components/Exchange/SwapBox.js #: src/components/Exchange/SwapBox.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/SwapCard/SwapCard.tsx #: src/components/Synthetics/SwapCard/SwapCard.tsx msgid "{0} Price" @@ -2237,6 +2225,10 @@ msgstr "" msgid "APRs are updated weekly on Wednesday and will depend on the fees collected for the week." msgstr "" +#: src/components/Synthetics/TradeBox/TradeBoxRows/AdvancedDisplayRows.tsx +msgid "Advanced Display" +msgstr "" + #: src/components/Synthetics/SubaccountModal/utils.ts msgid "Generate & Activate Subaccount" msgstr "" @@ -2294,7 +2286,6 @@ msgid "Couldn't find a swap route with enough liquidity" msgstr "" #: src/components/Exchange/ConfirmationBox.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx msgid "Confirm Long" msgstr "" @@ -2345,6 +2336,10 @@ msgstr "" msgid "Invalid price, see warning" msgstr "" +#: src/components/Synthetics/TradeBox/hooks/useCollateralInTooltipContent.tsx +msgid "You will be short {indexSymbol} only from your short position." +msgstr "" + #: src/pages/Actions/ActionsV1/ActionsV1.tsx msgid "GMX V1 {networkName} actions for all accounts." msgstr "" @@ -2361,6 +2356,10 @@ msgstr "" msgid "You need to select {swapTokenSymbol} as the \"Pay\" token to use it for collateral to initiate this trade." msgstr "" +#: src/components/Synthetics/TradeBox/TradeBoxRows/LimitAndTPSLRows.tsx +msgid "There are issues in the TP/SL orders." +msgstr "" + #: src/components/Glp/GlpSwap.js msgid "The Bonus Rebate is an estimate and will be airdropped as ARB tokens when migrating this liquidity to GM pools within the same epoch. <0>Read more." msgstr "" @@ -2398,9 +2397,12 @@ msgstr "" msgid "Cancel failed." msgstr "" +#: src/components/Synthetics/TradeBox/TradeBoxRows/AvailableLiquidityRow.tsx +msgid "The order will be executed if there is sufficient liquidity and the execution price guarantees that you will receive the minimum receive amount." +msgstr "" + #: src/components/Exchange/ConfirmationBox.js #: src/components/Exchange/PositionSeller.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx msgid "Transacting with a depegged stable coin is subject to spreads reflecting the worse of current market price or $1.00, with transactions involving multiple stablecoins may have multiple spreads." msgstr "" @@ -2445,10 +2447,6 @@ msgstr "" msgid "Open positions: {0}<0/>Under risk: {1}" msgstr "" -#: src/components/SubaccountNavigationButton/SubaccountNavigationButton.tsx -msgid "There are insufficient funds in your Subaccount for One-Click Trading. Click here to top-up." -msgstr "" - #: src/components/Exchange/UsefulLinks.tsx msgid "Speed up page loading" msgstr "" @@ -2517,10 +2515,6 @@ msgstr "" msgid "Adding referral code failed." msgstr "" -#: src/components/SubaccountNavigationButton/SubaccountNavigationButton.tsx -msgid "The previously authorized maximum number of Actions has been reached for One-Click Trading. Click here to re-authorize." -msgstr "" - #: src/components/Exchange/PositionEditor.js msgid "Max leverage without PnL: {0}x" msgstr "" @@ -2680,13 +2674,12 @@ msgstr "" #: src/components/Exchange/PositionSeller.js #: src/components/Exchange/SwapBox.js #: src/components/Exchange/SwapBox.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/OrderEditor/OrderEditor.tsx -#: src/components/Synthetics/PositionEditor/PositionEditor.tsx -#: src/components/Synthetics/PositionSeller/PositionSeller.tsx -#: src/components/Synthetics/TradeBox/TradeBox.tsx -#: src/components/Synthetics/TradeBox/TradeBox.tsx +#: src/components/Synthetics/PositionEditor/PositionEditorAdvancedRows.tsx +#: src/components/Synthetics/PositionSeller/PositionSellerAdvancedDisplayRows.tsx #: src/components/Synthetics/TradeBox/TradeBox.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/AdvancedDisplayRows.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/AdvancedDisplayRows.tsx msgid "Leverage" msgstr "" @@ -2791,10 +2784,6 @@ msgstr "" msgid "Claim failed." msgstr "" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -msgid "You have selected {collateralTokenSymbol} as collateral; the liquidation price is higher compared to using a stablecoin as collateral since the worth of the collateral will change with its price. If required and available, you can change the collateral type using the \"Collateral In\" option in the trade box." -msgstr "" - #: src/components/Synthetics/Claims/SettleAccruedCard.tsx msgid "Accrued Price Impact Rebates. They will become Claimable after some time.<0/><1/><2>Read more." msgstr "" @@ -2861,10 +2850,6 @@ msgstr "" msgid "GM can be sold for {0} and {1} for this market up to the specified selling caps. The remaining tokens in the pool are reserved for currently open positions." msgstr "" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -msgid "Collateral value may differ due to different Price Impact at the time of execution." -msgstr "" - #: src/components/Synthetics/ExecutionPriceRow.tsx #: src/components/Synthetics/TradeHistory/TradeHistoryRow/utils/position.ts #: src/components/Synthetics/TradeHistory/TradeHistoryRow/utils/position.ts @@ -2967,6 +2952,10 @@ msgstr "" msgid "{longOrShort} positions {fundingAction} a funding fee of {fundingRate} per hour and {borrowAction} a borrow fee of {borrowRate} per hour." msgstr "" +#: src/components/Synthetics/TradeBox/TradeBoxRows/LimitAndTPSLRows.tsx +msgid "Limit / TP / SL" +msgstr "" + #: src/components/Exchange/OrderEditor.js #: src/components/Synthetics/OrderEditor/OrderEditor.tsx msgid "Updating Order..." @@ -3029,8 +3018,8 @@ msgstr "" #: src/components/Exchange/ConfirmationBox.js #: src/components/Exchange/PositionSeller.js #: src/components/SettingsModal/SettingsModal.tsx -#: src/components/Synthetics/ConfirmationBox/rows/AllowedSlippageRow.tsx #: src/components/Synthetics/PositionSeller/rows/AllowedSlippageRow.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/AllowedSlippageRow.tsx msgid "Allowed Slippage" msgstr "" @@ -3147,12 +3136,11 @@ msgstr "" #: src/components/Exchange/PositionSeller.js #: src/components/Exchange/PositionsList.js #: src/components/Exchange/TradeHistory.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/PositionItem/PositionItem.tsx #: src/components/Synthetics/PositionItem/PositionItem.tsx -#: src/components/Synthetics/PositionSeller/PositionSeller.tsx -#: src/components/Synthetics/PositionSeller/PositionSeller.tsx -#: src/components/Synthetics/TradeBox/TradeBox.tsx +#: src/components/Synthetics/PositionSeller/PositionSellerAdvancedDisplayRows.tsx +#: src/components/Synthetics/PositionSeller/PositionSellerAdvancedDisplayRows.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/AdvancedDisplayRows.tsx #: src/components/Synthetics/TradeHistory/TradeHistoryRow/utils/position.ts #: src/pages/AccountDashboard/DailyAndCumulativePnL.tsx #: src/pages/Actions/ActionsV1/ActionsV1.tsx @@ -3176,6 +3164,7 @@ msgstr "" #: src/components/Exchange/PositionEditor.js #: src/components/Exchange/PositionEditor.js #: src/components/Synthetics/PositionEditor/PositionEditor.tsx +#: src/components/Synthetics/PositionEditor/types.ts #: src/components/Synthetics/SubaccountModal/SubaccountModal.tsx #: src/components/Synthetics/TradeHistory/keys.ts #: src/pages/Stake/StakeV2.tsx @@ -3261,8 +3250,8 @@ msgstr "" msgid "Active Referral Code" msgstr "" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/PositionEditor/PositionEditor.tsx +#: src/components/Synthetics/TradeBox/hooks/useTradeWarningsRows.tsx msgid "Pending {0} approval" msgstr "" @@ -3274,6 +3263,10 @@ msgstr "" msgid "The position would be immediately liquidated upon order execution. Try reducing the size." msgstr "" +#: src/components/Synthetics/TradeBox/TradeBoxRows/OneClickTrading.tsx +msgid "Enable" +msgstr "" + #: src/components/Synthetics/GmList/GmList.tsx #: src/components/Synthetics/MarketTokenSelector/MarketTokenSelector.tsx msgid "BUYABLE" @@ -3305,6 +3298,10 @@ msgstr "" msgid "You have yet to reach the minimum \"Capital Used\" of {0} to qualify for the rankings." msgstr "" +#: src/components/Synthetics/TradeBox/TradeBoxRows/LimitPriceRow.tsx +msgid "The execution price for the limit order updates in real-time on the orders tab after order creation to guarantee that you receive the minimum receive amount." +msgstr "" + #: src/components/Exchange/SwapBox.js msgid "Swap amount exceeds Available Liquidity." msgstr "" @@ -3326,8 +3323,8 @@ msgstr "" msgid "Unknown buy GM order" msgstr "" -#: src/components/Synthetics/ConfirmationBox/rows/AllowedSlippageRow.tsx #: src/components/Synthetics/PositionSeller/rows/AllowedSlippageRow.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/AllowedSlippageRow.tsx msgid "You can edit the default Allowed Slippage in the settings menu on the top right of the page.<0/><1/>Note that a low allowed slippage, e.g. less than -{0}, may result in failed orders if prices are volatile." msgstr "" @@ -3363,7 +3360,7 @@ msgstr "" #: src/components/Exchange/SwapBox.js #: src/components/Synthetics/CollateralSelector/CollateralSelector.tsx #: src/components/Synthetics/CollateralSelector/CollateralSelector.tsx -#: src/components/Synthetics/TradeBox/CollateralSelectorRow.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/CollateralSelectorRow.tsx msgid "Collateral In" msgstr "" @@ -3383,8 +3380,8 @@ msgstr "" msgid "TRADING Airdrop" msgstr "" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -msgid "Limit Order Price to guarantee Min. Receive amount is updated in real time in the Orders tab after the order has been created." +#: src/components/Synthetics/TradeBox/hooks/useCollateralInTooltipContent.tsx +msgid "You will be short {indexSymbol} from your short position, while being long {collateralSymbol} from your {collateralSymbol} collateral. This can be useful for delta-neutral strategies to earn funding fees." msgstr "" #: src/components/Referrals/TradersStats.tsx @@ -3445,8 +3442,8 @@ msgstr "" msgid "The Execution Price didn't meet the Acceptable Price condition. The Order will get filled when the condition is met." msgstr "" -#: src/components/Synthetics/PositionEditor/PositionEditor.tsx -#: src/components/Synthetics/PositionSeller/PositionSeller.tsx +#: src/components/Synthetics/PositionEditor/PositionEditorAdvancedRows.tsx +#: src/components/Synthetics/PositionSeller/PositionSellerAdvancedDisplayRows.tsx msgid "Initial Collateral (Collateral excluding Borrow and Funding Fee)." msgstr "" @@ -3466,15 +3463,15 @@ msgstr "" #: src/components/AprInfo/AprInfo.tsx #: src/components/AprInfo/AprInfo.tsx #: src/components/Synthetics/AcceptablePriceImpactInputRow/AcceptablePriceImpactInputRow.tsx -#: src/components/Synthetics/PositionSeller/PositionSeller.tsx -#: src/components/Synthetics/TradeBox/TradeBox.tsx +#: src/components/Synthetics/PositionSeller/PositionSellerAdvancedDisplayRows.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/AdvancedDisplayRows.tsx #: src/pages/LeaderboardPage/components/LeaderboardAccountsTable.tsx #: src/pages/LeaderboardPage/components/LeaderboardPositionsTable.tsx #: src/pages/LeaderboardPage/components/LeaderboardPositionsTable.tsx msgid "NA" msgstr "" -#: src/components/Synthetics/TradeBox/CollateralSelectorRow.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/CollateralSelectorRow.tsx msgid "You have an existing position with {0} as collateral. This action will not apply for that position. <0>Switch to {1} collateral." msgstr "" @@ -3511,10 +3508,6 @@ msgstr "" #: src/components/Synthetics/Claims/ClaimHistoryRow/ClaimFundingFeesHistoryRow.tsx #: src/components/Synthetics/Claims/ClaimHistoryRow/ClaimFundingFeesHistoryRow.tsx #: src/components/Synthetics/Claims/ClaimsHistory.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/MarketCard/MarketCard.tsx #: src/components/Synthetics/MarketNetFee/MarketNetFee.tsx #: src/components/Synthetics/PositionEditor/PositionEditor.tsx @@ -3587,8 +3580,6 @@ msgstr "" #: src/components/Exchange/PositionsList.js #: src/components/Exchange/PositionsList.js #: src/components/Exchange/SwapBox.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/OrderEditor/OrderEditor.tsx #: src/components/Synthetics/PositionEditor/PositionEditor.tsx #: src/components/Synthetics/PositionItem/PositionItem.tsx @@ -3659,10 +3650,6 @@ msgstr "" msgid "You are leaving GMX.io and will be redirected to a third party, independent website." msgstr "" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -msgid "You have selected {collateralTokenSymbol} as collateral to short {indexTokenSymbol}." -msgstr "" - #: src/components/Synthetics/PositionItem/PositionItem.tsx #: src/components/Synthetics/PositionItem/PositionItem.tsx msgid "Accrued Borrow Fee" @@ -3698,10 +3685,10 @@ msgstr "" msgid "<0>Notifications are provided by Notifi and not affiliated with GMX. By subscribing, you agree that info you provide to Notifi will be governed by its <1>Privacy Policy<2> and <3>Terms of Use." msgstr "" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/GmSwap/GmConfirmationBox/GmConfirmationBox.tsx #: src/components/Synthetics/PositionEditor/PositionEditor.tsx #: src/components/Synthetics/PositionSeller/PositionSeller.tsx +#: src/components/Synthetics/TradeBox/hooks/useTradeWarningsRows.tsx msgid "High Network Fee not yet acknowledged" msgstr "" @@ -3742,11 +3729,6 @@ msgstr "" msgid "UI Fee" msgstr "" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -msgid "Confirm {0} Order" -msgstr "" - #: src/domain/synthetics/orders/simulateExecuteOrderTxn.tsx #: src/domain/synthetics/orders/simulateExecuteOrderTxn.tsx msgid "Execute order simulation failed." @@ -3791,9 +3773,10 @@ msgstr "" #: src/components/Exchange/ConfirmationBox.js #: src/components/Exchange/PositionSeller.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/PositionEditor/PositionEditor.tsx #: src/components/Synthetics/PositionSeller/PositionSeller.tsx +#: src/components/Synthetics/TradeBox/hooks/useTradeButtonState.tsx +#: src/components/Synthetics/TradeBox/TradeBox.tsx msgid "Creating Order..." msgstr "" @@ -4058,7 +4041,6 @@ msgstr "" #: src/components/Exchange/OrdersList.js #: src/components/Exchange/TradeHistory.js #: src/components/Exchange/TradeHistory.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/domain/synthetics/orders/utils.tsx #: src/pages/OrdersOverview/OrdersOverview.js msgid "Decrease" @@ -4093,11 +4075,15 @@ msgstr "" msgid "GMX Weekly Updates" msgstr "" +#: src/components/Synthetics/TradeBox/hooks/useCollateralInTooltipContent.tsx +msgid "You will be long {indexSymbol} only from your long position." +msgstr "" + #: src/pages/OrdersOverview/OrdersOverview.js msgid "Total active: {openTotal}, executed: {executedTotal}, cancelled: {cancelledTotal}" msgstr "" -#: src/components/Synthetics/TradeBox/CollateralSelectorRow.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/CollateralSelectorRow.tsx msgid "You have an existing order with {symbol} as collateral. <0>Switch to {symbol} collateral." msgstr "" @@ -4132,7 +4118,7 @@ msgstr "" msgid "Yield simulator for GMX" msgstr "" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/AvailableLiquidityRow.tsx msgid "There may not be sufficient liquidity to execute your order when the Min. Receive are met." msgstr "" @@ -4178,9 +4164,9 @@ msgstr "" #: src/components/Exchange/SwapBox.js #: src/components/Exchange/SwapBox.js #: src/components/Exchange/SwapBox.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/MarketCard/MarketCard.tsx #: src/components/Synthetics/SwapCard/SwapCard.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/AvailableLiquidityRow.tsx msgid "Available Liquidity" msgstr "" @@ -4269,12 +4255,9 @@ msgstr "" #: src/components/Exchange/ConfirmationBox.js #: src/components/Exchange/PositionEditor.js #: src/components/Exchange/PositionSeller.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/PositionEditor/PositionEditor.tsx -#: src/components/Synthetics/PositionSeller/PositionSeller.tsx -#: src/components/Synthetics/TradeBox/TradeBox.tsx +#: src/components/Synthetics/PositionEditor/PositionEditorAdvancedRows.tsx +#: src/components/Synthetics/PositionSeller/PositionSellerAdvancedDisplayRows.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/AdvancedDisplayRows.tsx msgid "Collateral ({0})" msgstr "" @@ -4286,6 +4269,14 @@ msgstr "" msgid "Order updated!" msgstr "" +#: src/components/Synthetics/TradeBox/hooks/useCollateralInTooltipContent.tsx +msgid "You will be short {indexSymbol} from your short position, while being long {collateralSymbol} from your {collateralSymbol} collateral. The liquidation price will vary based on the price of {collateralSymbol}." +msgstr "" + +#: src/components/Synthetics/TradeBox/TradeBoxRows/OneClickTrading.tsx +msgid "The previously authorized maximum number of actions has been reached for One-Click Trading." +msgstr "" + #: src/components/Synthetics/CollateralSelector/CollateralSelector.tsx #: src/components/Synthetics/CollateralSelector/CollateralSelector.tsx msgid "Select a pool containing {0} to use it as collateral." @@ -4324,7 +4315,6 @@ msgid "Max Leverage without PnL: 100x" msgstr "" #: src/components/Exchange/ConfirmationBox.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx msgid "Confirm Short" msgstr "" @@ -4340,10 +4330,6 @@ msgstr "" msgid "Order Type" msgstr "" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -msgid "Decrease size" -msgstr "" - #: src/components/Synthetics/StatusNotification/GmStatusNotification.tsx msgid "Sell order executed" msgstr "" @@ -4360,13 +4346,9 @@ msgstr "" msgid "Affiliate Rewards Claimed" msgstr "" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -msgid "Old Collateral" -msgstr "" - #: src/components/Exchange/ConfirmationBox.js #: src/components/Exchange/PositionSeller.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/SwapSpreadRow.tsx msgid "Spread" msgstr "" @@ -4402,6 +4384,10 @@ msgstr "" msgid "Leaderboard for GMX traders" msgstr "" +#: src/components/Synthetics/TradeBox/TradeBoxRows/OneClickTrading.tsx +msgid "There are insufficient funds in your subaccount for One-Click Trading" +msgstr "" + #: src/components/Exchange/PositionsList.js msgid "Share" msgstr "" @@ -4546,7 +4532,7 @@ msgstr "" msgid "GLP autocompounding vaults" msgstr "" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx +#: src/components/Synthetics/TradeBox/hooks/useTradeButtonState.tsx msgid "TP/SL orders exceed the position" msgstr "" @@ -4575,7 +4561,7 @@ msgstr "" msgid "Top PnL (%)" msgstr "" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/AvailableLiquidityRow.tsx #: src/domain/synthetics/orders/utils.tsx msgid "There may not be sufficient liquidity to execute your order when the price conditions are met." msgstr "" @@ -4774,7 +4760,7 @@ msgstr "" msgid "Begin Transfer" msgstr "" -#: src/components/SubaccountNavigationButton/SubaccountNavigationButton.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/OneClickTrading.tsx msgid "One-Click Trading is not available for wrapping or unwrapping native token {0}." msgstr "" @@ -4823,7 +4809,7 @@ msgstr "" msgid "Cancel" msgstr "" -#: src/components/Synthetics/ConfirmationBox/SideOrderEntries.tsx +#: src/components/Synthetics/TradeBox/components/SideOrderEntries.tsx msgid "Remove Row" msgstr "" @@ -4849,10 +4835,6 @@ msgstr "" msgid "Buy or Transfer AVAX to Avalanche" msgstr "" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -msgid "You have selected {collateralTokenSymbol} as Collateral, the Liquidation Price will vary based on the price of {collateralTokenSymbol}." -msgstr "" - #: src/pages/Ecosystem/Ecosystem.js msgid "Telegram bot for Open Interest on GMX" msgstr "" @@ -4903,7 +4885,7 @@ msgstr "" msgid "Enter new amount or price" msgstr "" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/LimitAndTPSLRows.tsx msgid "Stop-Loss PnL" msgstr "" @@ -5034,7 +5016,7 @@ msgstr "" msgid "Stablecoin Percentage" msgstr "" -#: src/components/Synthetics/TradeBox/CollateralSelectorRow.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/CollateralSelectorRow.tsx msgid "You have an existing position with {0} as collateral. This Order will not be valid for that Position. <0>Switch to {1} collateral." msgstr "" @@ -5269,6 +5251,10 @@ msgstr "" msgid "Claim esGMX" msgstr "" +#: src/components/Synthetics/TradeBox/TradeBoxRows/OneClickTrading.tsx +msgid "Re-authorize" +msgstr "" + #: src/pages/BuyGMX/BuyGMX.tsx msgid "Buy or Transfer ETH to Arbitrum" msgstr "" @@ -5449,10 +5435,6 @@ msgstr "" msgid "Max Out" msgstr "" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -msgid "The order will only execute if the Min. Receive is met and there is sufficient liquidity." -msgstr "" - #: src/components/Exchange/PositionEditor.js #: src/components/Exchange/PositionSeller.js #: src/components/Exchange/PositionSeller.js @@ -5677,7 +5659,7 @@ msgstr "" msgid "{0} and {1} can be used to buy GM for this market up to the specified buying caps." msgstr "" -#: src/components/SubaccountNavigationButton/SubaccountNavigationButton.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/OneClickTrading.tsx msgid "One-Click Trading is not available using network's native token {0}. Consider using {1} instead." msgstr "" @@ -5755,8 +5737,7 @@ msgstr "" #: src/components/Exchange/ConfirmationBox.js #: src/components/Exchange/ConfirmationBox.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/LimitPriceRow.tsx msgid "Limit Price" msgstr "" @@ -5780,6 +5761,7 @@ msgstr "" #: src/components/Exchange/PositionEditor.js #: src/components/Exchange/PositionEditor.js #: src/components/Synthetics/PositionEditor/PositionEditor.tsx +#: src/components/Synthetics/PositionEditor/types.ts #: src/components/Synthetics/TradeHistory/keys.ts #: src/pages/Stake/StakeV2.tsx #: src/pages/Stake/StakeV2.tsx @@ -5815,10 +5797,6 @@ msgstr "" msgid "There may not be sufficient liquidity to execute the swap to the receive token when the price conditions are met." msgstr "" -#: src/components/SubaccountNavigationButton/SubaccountNavigationButton.tsx -msgid "Enable One-Click Trading" -msgstr "" - #: src/components/NotifyModal/NotifyModal.tsx msgid "Trade Errors" msgstr "" @@ -5842,8 +5820,6 @@ msgstr "" #: src/components/Exchange/SwapBox.js #: src/components/Glp/GlpSwap.js #: src/components/Glp/GlpSwap.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/GmSwap/GmConfirmationBox/GmConfirmationBox.tsx #: src/components/Synthetics/GmSwap/GmConfirmationBox/GmConfirmationBox.tsx #: src/components/Synthetics/GmSwap/GmSwapBox/GmSwapBox.tsx @@ -5911,9 +5887,9 @@ msgstr "" msgid "There are insufficient funds in your Subaccount for One-Click Trading. <0>Click here to top-up." msgstr "" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx +#: src/components/Synthetics/TradeBox/hooks/useTradeboxTransactions.tsx +#: src/components/Synthetics/TradeBox/hooks/useTradeboxTransactions.tsx +#: src/components/Synthetics/TradeBox/hooks/useTradeboxTransactions.tsx msgid "Error submitting order" msgstr "" @@ -6009,10 +5985,6 @@ msgstr "" msgid "Rebates" msgstr "" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -msgid "The spread is > 1%, please ensure the trade details are acceptable before comfirming" -msgstr "" - #: src/components/Glp/GlpSwap.js msgid "Sell failed." msgstr "" @@ -6046,7 +6018,7 @@ msgstr "" msgid "Date" msgstr "" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx +#: src/components/Synthetics/TradeBox/hooks/useTradeWarningsRows.tsx #: src/domain/synthetics/trade/utils/validation.ts #: src/domain/synthetics/trade/utils/validation.ts #: src/domain/synthetics/trade/utils/validation.ts @@ -6086,7 +6058,6 @@ msgid "Price above Mark Price" msgstr "" #: src/components/Exchange/PositionSeller.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/OrderItem/OrderItem.tsx #: src/components/Synthetics/OrderList/OrderList.tsx #: src/components/Synthetics/PositionSeller/PositionSeller.tsx @@ -6167,7 +6138,7 @@ msgstr "" msgid "The amount left in the subaccount is not enough to cover network gas costs." msgstr "" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/LimitAndTPSLRows.tsx msgid "Take-Profit PnL" msgstr "" @@ -6408,10 +6379,6 @@ msgstr "" #: src/components/Synthetics/Claims/ClaimHistoryRow/ClaimFundingFeesHistoryRow.tsx #: src/components/Synthetics/Claims/ClaimHistoryRow/ClaimFundingFeesHistoryRow.tsx #: src/components/Synthetics/Claims/ClaimsHistory.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/MarketCard/MarketCard.tsx #: src/components/Synthetics/MarketNetFee/MarketNetFee.tsx #: src/components/Synthetics/PositionEditor/PositionEditor.tsx @@ -6554,7 +6521,6 @@ msgid "Failed Settlement of Funding Fees" msgstr "" #: src/components/Exchange/ConfirmationBox.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx msgid "Pay Amount" msgstr "" @@ -6624,7 +6590,7 @@ msgstr "" msgid "{ordersText} cancelled" msgstr "" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx +#: src/components/Synthetics/TradeBox/hooks/useTradeButtonState.tsx msgid "Limit price below Mark Price" msgstr "" @@ -6649,7 +6615,7 @@ msgid "Transaction was cancelled." msgstr "" #: src/components/Exchange/ConfirmationBox.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx +#: src/components/Synthetics/TradeBox/hooks/useTradeButtonState.tsx msgid "Accept confirmation of trigger orders" msgstr "" @@ -6920,10 +6886,6 @@ msgstr "" msgid "Enter a trigger price" msgstr "" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -msgid "Limit Order Price will vary based on Fees and Price Impact to guarantee the Min. Receive amount." -msgstr "" - #: src/pages/BeginAccountTransfer/BeginAccountTransfer.tsx msgid "Vested GLP not withdrawn" msgstr "" @@ -6935,11 +6897,9 @@ msgstr "" #: src/components/Exchange/PositionsList.js #: src/components/Exchange/SwapBox.js #: src/components/Exchange/SwapBox.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/PositionEditor/PositionEditor.tsx #: src/components/Synthetics/PositionItem/PositionItem.tsx #: src/components/Synthetics/PositionList/PositionList.tsx -#: src/components/Synthetics/TradeBox/TradeBox.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/EntryPriceRow.tsx #: src/pages/LeaderboardPage/components/LeaderboardPositionsTable.tsx msgid "Entry Price" msgstr "" @@ -6962,6 +6922,7 @@ msgstr "" #: src/components/AddressDropdown/AddressDropdown.tsx #: src/components/Synthetics/SubaccountModal/SubaccountModal.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/OneClickTrading.tsx msgid "One-Click Trading" msgstr "" @@ -7025,11 +6986,10 @@ msgid "SELL…" msgstr "" #: src/components/Exchange/ConfirmationBox.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx msgid "Confirm Swap" msgstr "" -#: src/components/Synthetics/PositionSeller/PositionSeller.tsx +#: src/components/Synthetics/PositionSeller/PositionSellerAdvancedDisplayRows.tsx msgid "Keep leverage is not available as Position exceeds max. allowed leverage. <0>Read more." msgstr "" @@ -7093,6 +7053,10 @@ msgstr "" msgid "<0>The APY is an estimate based on the fees collected for the past seven days, extrapolating the current borrowing fee. It excludes:<1><2>price changes of the underlying token(s)<3>traders' PnL, which is expected to be neutral in the long term<4>funding fees, which are exchanged between traders<5><6>Read more about GM token pricing.<7>Check GM pools' performance against other LP Positions in the <8>GMX Dune Dashboard." msgstr "" +#: src/components/Synthetics/TradeBox/TradeBoxRows/OneClickTrading.tsx +msgid "Top-Up" +msgstr "" + #: src/components/Synthetics/MarketCard/MarketCard.tsx msgid "Ask Price (Exit)" msgstr "" @@ -7105,6 +7069,10 @@ msgstr "" msgid "Orders ({ordersCount})" msgstr "" +#: src/components/Synthetics/TradeBox/hooks/useCollateralInTooltipContent.tsx +msgid "You will be long {indexSymbol} from your long position, as well as from your {collateralSymbol} collateral. The liquidation price is higher compared to using a stablecoin as collateral since the worth of the collateral will change with its price." +msgstr "" + #: src/pages/Ecosystem/Ecosystem.js msgid "GMX explorer for stats and traders" msgstr "" @@ -7150,7 +7118,7 @@ msgstr "" msgid "Fee values do not include incentives." msgstr "" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx +#: src/components/Synthetics/TradeBox/hooks/useTradeButtonState.tsx msgid "Limit price above Mark Price" msgstr "" @@ -7166,7 +7134,6 @@ msgstr "" #: src/components/Exchange/SwapBox.js #: src/components/Exchange/SwapBox.js #: src/components/Exchange/SwapBox.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/OrderList/filters/OrderTypeFilter.tsx #: src/components/Synthetics/StatusNotification/OrderStatusNotification.tsx #: src/components/Synthetics/SwapCard/SwapCard.tsx @@ -7328,10 +7295,8 @@ msgstr "" #: src/components/Exchange/PositionSeller.js #: src/components/Exchange/PositionsList.js #: src/components/Exchange/PositionsList.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/OrderItem/OrderItem.tsx #: src/components/Synthetics/OrderList/OrderList.tsx -#: src/components/Synthetics/PositionEditor/PositionEditor.tsx #: src/components/Synthetics/PositionItem/PositionItem.tsx #: src/components/Synthetics/PositionList/PositionList.tsx #: src/components/Synthetics/TradeHistory/useDownloadAsCsv.tsx @@ -7438,7 +7403,7 @@ msgid "short" msgstr "" #: src/components/Exchange/ConfirmationBox.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx +#: src/components/Synthetics/TradeBox/hooks/useTriggerOrdersConsent.tsx msgid "I am aware of the trigger orders" msgstr "" @@ -7483,12 +7448,12 @@ msgstr "" #: src/components/Exchange/ConfirmationBox.js #: src/components/Exchange/PositionSeller.js -#: src/components/Synthetics/ConfirmationBox/rows/AllowedSlippageRow.tsx #: src/components/Synthetics/PositionSeller/rows/AllowedSlippageRow.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/AllowedSlippageRow.tsx msgid "Slippage is too high" msgstr "" -#: src/components/Synthetics/ConfirmationBox/SideOrderEntries.tsx +#: src/components/Synthetics/TradeBox/components/SideOrderEntries.tsx msgid "Add Row" msgstr "" @@ -7543,12 +7508,12 @@ msgstr "" #: src/components/Exchange/OrdersList.js #: src/components/Exchange/OrdersList.js #: src/components/Exchange/SwapBox.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/OrderEditor/OrderEditor.tsx #: src/components/Synthetics/OrderItem/OrderItem.tsx #: src/components/Synthetics/OrderList/filters/OrderTypeFilter.tsx #: src/components/Synthetics/PositionItem/PositionItem.tsx #: src/components/Synthetics/TradeBox/TradeBox.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/LimitAndTPSLRows.tsx #: src/components/Synthetics/TradeHistory/keys.ts msgid "Limit" msgstr "" @@ -7571,7 +7536,6 @@ msgid "<0>Insufficient liquidity to execute the order<1>The mark price which msgstr "" #: src/components/Exchange/ConfirmationBox.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx msgid "Your position's collateral after deducting fees:" msgstr "" @@ -7621,8 +7585,8 @@ msgstr "" msgid "01 Sep 2021" msgstr "" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/OrderList/filters/OrderTypeFilter.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/LimitAndTPSLRows.tsx #: src/domain/synthetics/positions/utils.ts msgid "Take-Profit" msgstr "" diff --git a/src/locales/ru/messages.po b/src/locales/ru/messages.po index d320f92bba..15ddaa2c12 100644 --- a/src/locales/ru/messages.po +++ b/src/locales/ru/messages.po @@ -79,7 +79,6 @@ msgid "Subaccount generation failed" msgstr "" #: src/components/Exchange/ConfirmationBox.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx msgid "{existingTriggerOrderLength, plural, one {You have an active trigger order that might execute immediately after you open this position. Please cancel the order or accept the confirmation to continue.} other {You have # active trigger orders that might execute immediately after you open this position. Please cancel the orders or accept the confirmation to continue.}}" msgstr "{existingTriggerOrderLength, plural, one {You have an active trigger order that might execute immediately after you open this position. Please cancel the order or accept the confirmation to continue.} other {You have # active trigger orders that might execute immediately after you open this position. Please cancel the orders or accept the confirmation to continue.}}" @@ -155,6 +154,10 @@ msgstr "{0} превышает целевой вес.<0/><1/>Получите м msgid "Withdrawal error." msgstr "" +#: src/components/Synthetics/TradeBox/TradeBox.tsx +msgid "The execution price will constantly vary based on fees and price impact to guarantee that you receive the minimum receive amount." +msgstr "" + #: src/pages/Home/Home.js msgid "Decentralized<0/>Perpetual Exchange" msgstr "Децентрализованная<0/>Бессрочная Биржа" @@ -236,7 +239,6 @@ msgstr "" #: src/components/Glp/GlpSwap.js #: src/components/Glp/GlpSwap.js #: src/components/Glp/GlpSwap.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/OrderEditor/OrderEditor.tsx #: src/components/Synthetics/TradeFeesRow/TradeFeesRow.tsx msgid "Fees" @@ -403,8 +405,6 @@ msgid "Insufficient liquidity in the {0} market pool. Select a different pool fo msgstr "" #: src/components/Exchange/ConfirmationBox.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx msgid "Confirm Limit Order" msgstr "" @@ -515,6 +515,7 @@ msgstr "" msgid "Incentives are airdropped weekly." msgstr "" +#: src/components/Synthetics/AcceptablePriceImpactInputRow/AcceptablePriceImpactInputRow.tsx #: src/components/Synthetics/AcceptablePriceImpactInputRow/AcceptablePriceImpactInputRow.tsx msgid "Acceptable Price Impact" msgstr "" @@ -527,10 +528,6 @@ msgstr "Добавить в MetaMask" msgid "Insufficient staked tokens" msgstr "" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -msgid "New Collateral" -msgstr "" - #: src/lib/wallets/connecters/binanceW3W/binanceWallet.ts msgid "Tap [Create Wallet] to start using your Web3 Wallet." msgstr "Нажмите [Создать кошелек], чтобы начать использовать ваш Web3 кошелек." @@ -721,8 +718,6 @@ msgstr "" #: src/components/Exchange/SwapBox.js #: src/components/Glp/GlpSwap.js #: src/components/Glp/GlpSwap.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/GmSwap/GmConfirmationBox/GmConfirmationBox.tsx #: src/components/Synthetics/GmSwap/GmConfirmationBox/GmConfirmationBox.tsx #: src/components/Synthetics/GmSwap/GmSwapBox/GmSwapBox.tsx @@ -747,8 +742,8 @@ msgstr "Страница Управления GMX" msgid "Decentralized Money Market" msgstr "" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/OrderList/filters/OrderTypeFilter.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/LimitAndTPSLRows.tsx #: src/domain/synthetics/positions/utils.ts msgid "Stop-Loss" msgstr "" @@ -774,10 +769,6 @@ msgstr "{0} GLP были зарезервированы для вестинга. msgid "Buy with {0}" msgstr "Купить с {0}" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -msgid "You have an existing position with {0} as collateral. This Order will not be valid for that Position." -msgstr "" - #: src/components/Referrals/JoinReferralCode.js msgid "Adding..." msgstr "Добавление..." @@ -891,8 +882,8 @@ msgid "Unstake completed!" msgstr "" #: src/components/Exchange/ConfirmationBox.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/OrderEditor/OrderEditor.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/MinReceiveRow.tsx msgid "Min. Receive" msgstr "Мин. Приём" @@ -931,8 +922,6 @@ msgstr "" #: src/components/Exchange/OrdersList.js #: src/components/Exchange/PositionsList.js #: src/components/Exchange/PositionsList.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/MarketStats/MarketStats.tsx #: src/components/Synthetics/OrderItem/OrderItem.tsx #: src/components/Synthetics/PositionItem/PositionItem.tsx @@ -1191,8 +1180,7 @@ msgstr "Телеграмм-бот для обновления позиции GMX msgid "account" msgstr "счёт" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/TradeBox/TradeBox.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/AdvancedDisplayRows.tsx msgid "Keep leverage at {0}" msgstr "" @@ -1299,6 +1287,10 @@ msgstr "" msgid "Select Positions" msgstr "" +#: src/components/Synthetics/TradeBox/hooks/useCollateralInTooltipContent.tsx +msgid "You will be long {indexSymbol} from your long position, while being long {collateralSymbol} from your {collateralSymbol} collateral. The liquidation price will vary based on the price of {collateralSymbol}." +msgstr "" + #: src/components/Referrals/AffiliatesStats.tsx #: src/components/Referrals/AffiliatesStats.tsx #: src/components/Referrals/TradersStats.tsx @@ -1552,7 +1544,7 @@ msgstr "" msgid "Mark" msgstr "" -#: src/components/Synthetics/PositionSeller/PositionSeller.tsx +#: src/components/Synthetics/PositionSeller/PositionSellerAdvancedDisplayRows.tsx msgid "Keep leverage at {keepLeverageAtValue}" msgstr "" @@ -1708,7 +1700,7 @@ msgstr "Проверка кода..." msgid "GM Pools" msgstr "" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/AvailableLiquidityRow.tsx msgid "The order will only execute if the price conditions are met and there is sufficient liquidity." msgstr "" @@ -1747,16 +1739,14 @@ msgstr "" #: src/components/Exchange/PositionsList.js #: src/components/Synthetics/Claims/ClaimsHistory.tsx #: src/components/Synthetics/Claims/ClaimsHistory.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/OrderEditor/OrderEditor.tsx #: src/components/Synthetics/OrderItem/OrderItem.tsx #: src/components/Synthetics/OrderList/OrderList.tsx -#: src/components/Synthetics/PositionEditor/PositionEditor.tsx +#: src/components/Synthetics/PositionEditor/PositionEditorAdvancedRows.tsx #: src/components/Synthetics/PositionItem/PositionItem.tsx #: src/components/Synthetics/PositionList/PositionList.tsx -#: src/components/Synthetics/PositionSeller/PositionSeller.tsx -#: src/components/Synthetics/TradeBox/TradeBox.tsx +#: src/components/Synthetics/PositionSeller/PositionSellerAdvancedDisplayRows.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/AdvancedDisplayRows.tsx #: src/components/Synthetics/TradeHistory/TradeHistory.tsx #: src/components/Synthetics/TradeHistory/useDownloadAsCsv.tsx #: src/pages/LeaderboardPage/components/LeaderboardPositionsTable.tsx @@ -1894,6 +1884,11 @@ msgstr "" msgid "{0} Approved!" msgstr "{0} Одобрено!" +#: src/components/Synthetics/PositionEditor/PositionEditorAdvancedRows.tsx +#: src/components/Synthetics/PositionSeller/PositionSellerAdvancedDisplayRows.tsx +msgid "Advanced display" +msgstr "" + #: src/components/Exchange/SwapBox.js msgid "Long {0}" msgstr "Лонг {0}" @@ -1917,7 +1912,7 @@ msgid "Total Trading Volume" msgstr "Общий Объем Торгов" #: src/components/Exchange/ConfirmationBox.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/CollateralSpreadRow.tsx msgid "Collateral Spread" msgstr "" @@ -2001,10 +1996,6 @@ msgstr "" msgid "Allow {0} to be spent" msgstr "" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -msgid "You have an existing position with {0} as collateral. This action will not apply for that position." -msgstr "" - #: src/components/Exchange/SwapBox.js msgid "Swap Order created!" msgstr "Создан Обменный Ордер" @@ -2053,7 +2044,7 @@ msgstr "" msgid "{existingTriggerOrderLength, plural, one {You have an active trigger order that could impact this position.} other {You have # active trigger orders that could impact this position.}}" msgstr "{existingTriggerOrderLength, plural, one {You have an active trigger order that could impact this position.} other {You have # active trigger orders that could impact this position.}}" -#: src/components/SubaccountNavigationButton/SubaccountNavigationButton.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/OneClickTrading.tsx msgid "Reduce wallet signing popups with One-Click Trading. This option is also available through the Wallet menu in the top right. <0>Read more." msgstr "Снизьте количество всплывающих окон подписи кошелька с помощью One-Click Trading. Этот вариант также доступен через меню кошелька в верхнем правом углу. <0>Подробнее." @@ -2069,7 +2060,6 @@ msgstr "" msgid "Swap {0} USDG for{1} {2}" msgstr "" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/OrderItem/OrderItem.tsx msgid "{0} will be swapped to {1} on order execution." msgstr "" @@ -2127,8 +2117,6 @@ msgstr "" #: src/components/Exchange/ConfirmationBox.js #: src/components/Exchange/SwapBox.js #: src/components/Exchange/SwapBox.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/SwapCard/SwapCard.tsx #: src/components/Synthetics/SwapCard/SwapCard.tsx msgid "{0} Price" @@ -2237,6 +2225,10 @@ msgstr "Цена ниже Маркированной Цены" msgid "APRs are updated weekly on Wednesday and will depend on the fees collected for the week." msgstr "Годовая Процентная Ставка обновляется еженедельно в среду и зависит от сборов, собранных за неделю." +#: src/components/Synthetics/TradeBox/TradeBoxRows/AdvancedDisplayRows.tsx +msgid "Advanced Display" +msgstr "" + #: src/components/Synthetics/SubaccountModal/utils.ts msgid "Generate & Activate Subaccount" msgstr "" @@ -2294,7 +2286,6 @@ msgid "Couldn't find a swap route with enough liquidity" msgstr "" #: src/components/Exchange/ConfirmationBox.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx msgid "Confirm Long" msgstr "Подтвердить Лонг" @@ -2345,6 +2336,10 @@ msgstr "Доступная сумма для вывода средств из GL msgid "Invalid price, see warning" msgstr "Недопустимая цена, смотрите предупреждение" +#: src/components/Synthetics/TradeBox/hooks/useCollateralInTooltipContent.tsx +msgid "You will be short {indexSymbol} only from your short position." +msgstr "" + #: src/pages/Actions/ActionsV1/ActionsV1.tsx msgid "GMX V1 {networkName} actions for all accounts." msgstr "" @@ -2361,6 +2356,10 @@ msgstr "" msgid "You need to select {swapTokenSymbol} as the \"Pay\" token to use it for collateral to initiate this trade." msgstr "Вам необходимо выбрать {swapTokenSymbol} в качестве \"Оплата\" токена, чтобы использовать его в качестве залога для инициирования этой сделки." +#: src/components/Synthetics/TradeBox/TradeBoxRows/LimitAndTPSLRows.tsx +msgid "There are issues in the TP/SL orders." +msgstr "" + #: src/components/Glp/GlpSwap.js msgid "The Bonus Rebate is an estimate and will be airdropped as ARB tokens when migrating this liquidity to GM pools within the same epoch. <0>Read more." msgstr "" @@ -2398,9 +2397,12 @@ msgstr "Текущая Сумма Пула" msgid "Cancel failed." msgstr "Отменить не удалось." +#: src/components/Synthetics/TradeBox/TradeBoxRows/AvailableLiquidityRow.tsx +msgid "The order will be executed if there is sufficient liquidity and the execution price guarantees that you will receive the minimum receive amount." +msgstr "" + #: src/components/Exchange/ConfirmationBox.js #: src/components/Exchange/PositionSeller.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx msgid "Transacting with a depegged stable coin is subject to spreads reflecting the worse of current market price or $1.00, with transactions involving multiple stablecoins may have multiple spreads." msgstr "" @@ -2445,10 +2447,6 @@ msgstr "Выбрать Рынок" msgid "Open positions: {0}<0/>Under risk: {1}" msgstr "Открытие позиций: {0}<0/>Под риском: {1}" -#: src/components/SubaccountNavigationButton/SubaccountNavigationButton.tsx -msgid "There are insufficient funds in your Subaccount for One-Click Trading. Click here to top-up." -msgstr "" - #: src/components/Exchange/UsefulLinks.tsx msgid "Speed up page loading" msgstr "Ускорить загрузку страницы" @@ -2517,10 +2515,6 @@ msgstr "Торговля" msgid "Adding referral code failed." msgstr "Добавить реферальный код не удалось." -#: src/components/SubaccountNavigationButton/SubaccountNavigationButton.tsx -msgid "The previously authorized maximum number of Actions has been reached for One-Click Trading. Click here to re-authorize." -msgstr "" - #: src/components/Exchange/PositionEditor.js msgid "Max leverage without PnL: {0}x" msgstr "" @@ -2680,13 +2674,12 @@ msgstr "" #: src/components/Exchange/PositionSeller.js #: src/components/Exchange/SwapBox.js #: src/components/Exchange/SwapBox.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/OrderEditor/OrderEditor.tsx -#: src/components/Synthetics/PositionEditor/PositionEditor.tsx -#: src/components/Synthetics/PositionSeller/PositionSeller.tsx -#: src/components/Synthetics/TradeBox/TradeBox.tsx -#: src/components/Synthetics/TradeBox/TradeBox.tsx +#: src/components/Synthetics/PositionEditor/PositionEditorAdvancedRows.tsx +#: src/components/Synthetics/PositionSeller/PositionSellerAdvancedDisplayRows.tsx #: src/components/Synthetics/TradeBox/TradeBox.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/AdvancedDisplayRows.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/AdvancedDisplayRows.tsx msgid "Leverage" msgstr "Плечо" @@ -2791,10 +2784,6 @@ msgstr "" msgid "Claim failed." msgstr "Запрос не прошел." -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -msgid "You have selected {collateralTokenSymbol} as collateral; the liquidation price is higher compared to using a stablecoin as collateral since the worth of the collateral will change with its price. If required and available, you can change the collateral type using the \"Collateral In\" option in the trade box." -msgstr "" - #: src/components/Synthetics/Claims/SettleAccruedCard.tsx msgid "Accrued Price Impact Rebates. They will become Claimable after some time.<0/><1/><2>Read more." msgstr "" @@ -2861,10 +2850,6 @@ msgstr "" msgid "GM can be sold for {0} and {1} for this market up to the specified selling caps. The remaining tokens in the pool are reserved for currently open positions." msgstr "" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -msgid "Collateral value may differ due to different Price Impact at the time of execution." -msgstr "" - #: src/components/Synthetics/ExecutionPriceRow.tsx #: src/components/Synthetics/TradeHistory/TradeHistoryRow/utils/position.ts #: src/components/Synthetics/TradeHistory/TradeHistoryRow/utils/position.ts @@ -2967,6 +2952,10 @@ msgstr "Вестинг GMX на Arbitrum" msgid "{longOrShort} positions {fundingAction} a funding fee of {fundingRate} per hour and {borrowAction} a borrow fee of {borrowRate} per hour." msgstr "" +#: src/components/Synthetics/TradeBox/TradeBoxRows/LimitAndTPSLRows.tsx +msgid "Limit / TP / SL" +msgstr "" + #: src/components/Exchange/OrderEditor.js #: src/components/Synthetics/OrderEditor/OrderEditor.tsx msgid "Updating Order..." @@ -3029,8 +3018,8 @@ msgstr "Пока нет сделок" #: src/components/Exchange/ConfirmationBox.js #: src/components/Exchange/PositionSeller.js #: src/components/SettingsModal/SettingsModal.tsx -#: src/components/Synthetics/ConfirmationBox/rows/AllowedSlippageRow.tsx #: src/components/Synthetics/PositionSeller/rows/AllowedSlippageRow.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/AllowedSlippageRow.tsx msgid "Allowed Slippage" msgstr "Допустимое Скольжение" @@ -3147,12 +3136,11 @@ msgstr "Обмен подан." #: src/components/Exchange/PositionSeller.js #: src/components/Exchange/PositionsList.js #: src/components/Exchange/TradeHistory.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/PositionItem/PositionItem.tsx #: src/components/Synthetics/PositionItem/PositionItem.tsx -#: src/components/Synthetics/PositionSeller/PositionSeller.tsx -#: src/components/Synthetics/PositionSeller/PositionSeller.tsx -#: src/components/Synthetics/TradeBox/TradeBox.tsx +#: src/components/Synthetics/PositionSeller/PositionSellerAdvancedDisplayRows.tsx +#: src/components/Synthetics/PositionSeller/PositionSellerAdvancedDisplayRows.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/AdvancedDisplayRows.tsx #: src/components/Synthetics/TradeHistory/TradeHistoryRow/utils/position.ts #: src/pages/AccountDashboard/DailyAndCumulativePnL.tsx #: src/pages/Actions/ActionsV1/ActionsV1.tsx @@ -3176,6 +3164,7 @@ msgstr "" #: src/components/Exchange/PositionEditor.js #: src/components/Exchange/PositionEditor.js #: src/components/Synthetics/PositionEditor/PositionEditor.tsx +#: src/components/Synthetics/PositionEditor/types.ts #: src/components/Synthetics/SubaccountModal/SubaccountModal.tsx #: src/components/Synthetics/TradeHistory/keys.ts #: src/pages/Stake/StakeV2.tsx @@ -3261,8 +3250,8 @@ msgstr "Позиция будет открыта на {0} USD с максима msgid "Active Referral Code" msgstr "Действующий реферальный код" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/PositionEditor/PositionEditor.tsx +#: src/components/Synthetics/TradeBox/hooks/useTradeWarningsRows.tsx msgid "Pending {0} approval" msgstr "" @@ -3274,6 +3263,10 @@ msgstr "Пожалуйста, переключите свою сеть на Arbi msgid "The position would be immediately liquidated upon order execution. Try reducing the size." msgstr "" +#: src/components/Synthetics/TradeBox/TradeBoxRows/OneClickTrading.tsx +msgid "Enable" +msgstr "" + #: src/components/Synthetics/GmList/GmList.tsx #: src/components/Synthetics/MarketTokenSelector/MarketTokenSelector.tsx msgid "BUYABLE" @@ -3305,6 +3298,10 @@ msgstr "" msgid "You have yet to reach the minimum \"Capital Used\" of {0} to qualify for the rankings." msgstr "" +#: src/components/Synthetics/TradeBox/TradeBoxRows/LimitPriceRow.tsx +msgid "The execution price for the limit order updates in real-time on the orders tab after order creation to guarantee that you receive the minimum receive amount." +msgstr "" + #: src/components/Exchange/SwapBox.js msgid "Swap amount exceeds Available Liquidity." msgstr "" @@ -3326,8 +3323,8 @@ msgstr "Предыдущий" msgid "Unknown buy GM order" msgstr "" -#: src/components/Synthetics/ConfirmationBox/rows/AllowedSlippageRow.tsx #: src/components/Synthetics/PositionSeller/rows/AllowedSlippageRow.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/AllowedSlippageRow.tsx msgid "You can edit the default Allowed Slippage in the settings menu on the top right of the page.<0/><1/>Note that a low allowed slippage, e.g. less than -{0}, may result in failed orders if prices are volatile." msgstr "" @@ -3363,7 +3360,7 @@ msgstr "Зарабатывать" #: src/components/Exchange/SwapBox.js #: src/components/Synthetics/CollateralSelector/CollateralSelector.tsx #: src/components/Synthetics/CollateralSelector/CollateralSelector.tsx -#: src/components/Synthetics/TradeBox/CollateralSelectorRow.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/CollateralSelectorRow.tsx msgid "Collateral In" msgstr "Залог Внесён" @@ -3383,8 +3380,8 @@ msgstr "Руководство по трейдингу" msgid "TRADING Airdrop" msgstr "" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -msgid "Limit Order Price to guarantee Min. Receive amount is updated in real time in the Orders tab after the order has been created." +#: src/components/Synthetics/TradeBox/hooks/useCollateralInTooltipContent.tsx +msgid "You will be short {indexSymbol} from your short position, while being long {collateralSymbol} from your {collateralSymbol} collateral. This can be useful for delta-neutral strategies to earn funding fees." msgstr "" #: src/components/Referrals/TradersStats.tsx @@ -3445,8 +3442,8 @@ msgstr "" msgid "The Execution Price didn't meet the Acceptable Price condition. The Order will get filled when the condition is met." msgstr "Цена исполнения не соответствует условиям Допустимой Цены. Ордер будет исполнен, когда условия будут выполнены." -#: src/components/Synthetics/PositionEditor/PositionEditor.tsx -#: src/components/Synthetics/PositionSeller/PositionSeller.tsx +#: src/components/Synthetics/PositionEditor/PositionEditorAdvancedRows.tsx +#: src/components/Synthetics/PositionSeller/PositionSellerAdvancedDisplayRows.tsx msgid "Initial Collateral (Collateral excluding Borrow and Funding Fee)." msgstr "" @@ -3466,15 +3463,15 @@ msgstr "Структурированные продукты" #: src/components/AprInfo/AprInfo.tsx #: src/components/AprInfo/AprInfo.tsx #: src/components/Synthetics/AcceptablePriceImpactInputRow/AcceptablePriceImpactInputRow.tsx -#: src/components/Synthetics/PositionSeller/PositionSeller.tsx -#: src/components/Synthetics/TradeBox/TradeBox.tsx +#: src/components/Synthetics/PositionSeller/PositionSellerAdvancedDisplayRows.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/AdvancedDisplayRows.tsx #: src/pages/LeaderboardPage/components/LeaderboardAccountsTable.tsx #: src/pages/LeaderboardPage/components/LeaderboardPositionsTable.tsx #: src/pages/LeaderboardPage/components/LeaderboardPositionsTable.tsx msgid "NA" msgstr "" -#: src/components/Synthetics/TradeBox/CollateralSelectorRow.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/CollateralSelectorRow.tsx msgid "You have an existing position with {0} as collateral. This action will not apply for that position. <0>Switch to {1} collateral." msgstr "" @@ -3511,10 +3508,6 @@ msgstr "Цена триггера для ордера." #: src/components/Synthetics/Claims/ClaimHistoryRow/ClaimFundingFeesHistoryRow.tsx #: src/components/Synthetics/Claims/ClaimHistoryRow/ClaimFundingFeesHistoryRow.tsx #: src/components/Synthetics/Claims/ClaimsHistory.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/MarketCard/MarketCard.tsx #: src/components/Synthetics/MarketNetFee/MarketNetFee.tsx #: src/components/Synthetics/PositionEditor/PositionEditor.tsx @@ -3587,8 +3580,6 @@ msgstr "" #: src/components/Exchange/PositionsList.js #: src/components/Exchange/PositionsList.js #: src/components/Exchange/SwapBox.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/OrderEditor/OrderEditor.tsx #: src/components/Synthetics/PositionEditor/PositionEditor.tsx #: src/components/Synthetics/PositionItem/PositionItem.tsx @@ -3659,10 +3650,6 @@ msgstr "Торгуйте на GMX и выиграйте <0>$250.000 в ка msgid "You are leaving GMX.io and will be redirected to a third party, independent website." msgstr "Вы покидаете сайт GMX.io и будете перенаправлены на сторонний, независимый сайт." -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -msgid "You have selected {collateralTokenSymbol} as collateral to short {indexTokenSymbol}." -msgstr "" - #: src/components/Synthetics/PositionItem/PositionItem.tsx #: src/components/Synthetics/PositionItem/PositionItem.tsx msgid "Accrued Borrow Fee" @@ -3698,10 +3685,10 @@ msgstr "" msgid "<0>Notifications are provided by Notifi and not affiliated with GMX. By subscribing, you agree that info you provide to Notifi will be governed by its <1>Privacy Policy<2> and <3>Terms of Use." msgstr "" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/GmSwap/GmConfirmationBox/GmConfirmationBox.tsx #: src/components/Synthetics/PositionEditor/PositionEditor.tsx #: src/components/Synthetics/PositionSeller/PositionSeller.tsx +#: src/components/Synthetics/TradeBox/hooks/useTradeWarningsRows.tsx msgid "High Network Fee not yet acknowledged" msgstr "" @@ -3742,11 +3729,6 @@ msgstr "" msgid "UI Fee" msgstr "" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -msgid "Confirm {0} Order" -msgstr "" - #: src/domain/synthetics/orders/simulateExecuteOrderTxn.tsx #: src/domain/synthetics/orders/simulateExecuteOrderTxn.tsx msgid "Execute order simulation failed." @@ -3791,9 +3773,10 @@ msgstr "Документация" #: src/components/Exchange/ConfirmationBox.js #: src/components/Exchange/PositionSeller.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/PositionEditor/PositionEditor.tsx #: src/components/Synthetics/PositionSeller/PositionSeller.tsx +#: src/components/Synthetics/TradeBox/hooks/useTradeButtonState.tsx +#: src/components/Synthetics/TradeBox/TradeBox.tsx msgid "Creating Order..." msgstr "Создание Ордера..." @@ -4058,7 +4041,6 @@ msgstr "Уменьшено" #: src/components/Exchange/OrdersList.js #: src/components/Exchange/TradeHistory.js #: src/components/Exchange/TradeHistory.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/domain/synthetics/orders/utils.tsx #: src/pages/OrdersOverview/OrdersOverview.js msgid "Decrease" @@ -4093,11 +4075,15 @@ msgstr "Дец." msgid "GMX Weekly Updates" msgstr "Еженедельные Обновления MX" +#: src/components/Synthetics/TradeBox/hooks/useCollateralInTooltipContent.tsx +msgid "You will be long {indexSymbol} only from your long position." +msgstr "" + #: src/pages/OrdersOverview/OrdersOverview.js msgid "Total active: {openTotal}, executed: {executedTotal}, cancelled: {cancelledTotal}" msgstr "Всего активных: {openTotal}, выполненных: {executedTotal}, отмененных: {cancelledTotal}" -#: src/components/Synthetics/TradeBox/CollateralSelectorRow.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/CollateralSelectorRow.tsx msgid "You have an existing order with {symbol} as collateral. <0>Switch to {symbol} collateral." msgstr "" @@ -4132,7 +4118,7 @@ msgstr "" msgid "Yield simulator for GMX" msgstr "Симулятор доходности для GMX" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/AvailableLiquidityRow.tsx msgid "There may not be sufficient liquidity to execute your order when the Min. Receive are met." msgstr "" @@ -4178,9 +4164,9 @@ msgstr "" #: src/components/Exchange/SwapBox.js #: src/components/Exchange/SwapBox.js #: src/components/Exchange/SwapBox.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/MarketCard/MarketCard.tsx #: src/components/Synthetics/SwapCard/SwapCard.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/AvailableLiquidityRow.tsx msgid "Available Liquidity" msgstr "Доступная ликвидность" @@ -4269,12 +4255,9 @@ msgstr "" #: src/components/Exchange/ConfirmationBox.js #: src/components/Exchange/PositionEditor.js #: src/components/Exchange/PositionSeller.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/PositionEditor/PositionEditor.tsx -#: src/components/Synthetics/PositionSeller/PositionSeller.tsx -#: src/components/Synthetics/TradeBox/TradeBox.tsx +#: src/components/Synthetics/PositionEditor/PositionEditorAdvancedRows.tsx +#: src/components/Synthetics/PositionSeller/PositionSellerAdvancedDisplayRows.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/AdvancedDisplayRows.tsx msgid "Collateral ({0})" msgstr "Залог ({0})" @@ -4286,6 +4269,14 @@ msgstr "" msgid "Order updated!" msgstr "Ордер обновлён!" +#: src/components/Synthetics/TradeBox/hooks/useCollateralInTooltipContent.tsx +msgid "You will be short {indexSymbol} from your short position, while being long {collateralSymbol} from your {collateralSymbol} collateral. The liquidation price will vary based on the price of {collateralSymbol}." +msgstr "" + +#: src/components/Synthetics/TradeBox/TradeBoxRows/OneClickTrading.tsx +msgid "The previously authorized maximum number of actions has been reached for One-Click Trading." +msgstr "" + #: src/components/Synthetics/CollateralSelector/CollateralSelector.tsx #: src/components/Synthetics/CollateralSelector/CollateralSelector.tsx msgid "Select a pool containing {0} to use it as collateral." @@ -4324,7 +4315,6 @@ msgid "Max Leverage without PnL: 100x" msgstr "" #: src/components/Exchange/ConfirmationBox.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx msgid "Confirm Short" msgstr "Подтвердить Шорт" @@ -4340,10 +4330,6 @@ msgstr "" msgid "Order Type" msgstr "" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -msgid "Decrease size" -msgstr "" - #: src/components/Synthetics/StatusNotification/GmStatusNotification.tsx msgid "Sell order executed" msgstr "" @@ -4360,13 +4346,9 @@ msgstr "" msgid "Affiliate Rewards Claimed" msgstr "" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -msgid "Old Collateral" -msgstr "" - #: src/components/Exchange/ConfirmationBox.js #: src/components/Exchange/PositionSeller.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/SwapSpreadRow.tsx msgid "Spread" msgstr "Спред" @@ -4402,6 +4384,10 @@ msgstr "Загрузка..." msgid "Leaderboard for GMX traders" msgstr "Таблица лидеров для трейдеров GMX" +#: src/components/Synthetics/TradeBox/TradeBoxRows/OneClickTrading.tsx +msgid "There are insufficient funds in your subaccount for One-Click Trading" +msgstr "" + #: src/components/Exchange/PositionsList.js msgid "Share" msgstr "Акции" @@ -4546,7 +4532,7 @@ msgstr "" msgid "GLP autocompounding vaults" msgstr "" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx +#: src/components/Synthetics/TradeBox/hooks/useTradeButtonState.tsx msgid "TP/SL orders exceed the position" msgstr "" @@ -4575,7 +4561,7 @@ msgstr "При закрытии позиции вы можете выбрать, msgid "Top PnL (%)" msgstr "" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/AvailableLiquidityRow.tsx #: src/domain/synthetics/orders/utils.tsx msgid "There may not be sufficient liquidity to execute your order when the price conditions are met." msgstr "" @@ -4774,7 +4760,7 @@ msgstr "" msgid "Begin Transfer" msgstr "Начать перевод" -#: src/components/SubaccountNavigationButton/SubaccountNavigationButton.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/OneClickTrading.tsx msgid "One-Click Trading is not available for wrapping or unwrapping native token {0}." msgstr "" @@ -4823,7 +4809,7 @@ msgstr "" msgid "Cancel" msgstr "Отменить" -#: src/components/Synthetics/ConfirmationBox/SideOrderEntries.tsx +#: src/components/Synthetics/TradeBox/components/SideOrderEntries.tsx msgid "Remove Row" msgstr "" @@ -4849,10 +4835,6 @@ msgstr "Ордер закрыт." msgid "Buy or Transfer AVAX to Avalanche" msgstr "" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -msgid "You have selected {collateralTokenSymbol} as Collateral, the Liquidation Price will vary based on the price of {collateralTokenSymbol}." -msgstr "" - #: src/pages/Ecosystem/Ecosystem.js msgid "Telegram bot for Open Interest on GMX" msgstr "Telegram бот для Открытого Процента на GMX" @@ -4903,7 +4885,7 @@ msgstr "" msgid "Enter new amount or price" msgstr "" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/LimitAndTPSLRows.tsx msgid "Stop-Loss PnL" msgstr "" @@ -5034,7 +5016,7 @@ msgstr "Объем сделок, совершенных привлеченным msgid "Stablecoin Percentage" msgstr "Процент Стабильной монеты" -#: src/components/Synthetics/TradeBox/CollateralSelectorRow.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/CollateralSelectorRow.tsx msgid "You have an existing position with {0} as collateral. This Order will not be valid for that Position. <0>Switch to {1} collateral." msgstr "" @@ -5269,6 +5251,10 @@ msgstr "" msgid "Claim esGMX" msgstr "Запрос esGMX" +#: src/components/Synthetics/TradeBox/TradeBoxRows/OneClickTrading.tsx +msgid "Re-authorize" +msgstr "" + #: src/pages/BuyGMX/BuyGMX.tsx msgid "Buy or Transfer ETH to Arbitrum" msgstr "" @@ -5449,10 +5435,6 @@ msgstr "" msgid "Max Out" msgstr "" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -msgid "The order will only execute if the Min. Receive is met and there is sufficient liquidity." -msgstr "" - #: src/components/Exchange/PositionEditor.js #: src/components/Exchange/PositionSeller.js #: src/components/Exchange/PositionSeller.js @@ -5677,7 +5659,7 @@ msgstr "Открыть {0} в Explorer" msgid "{0} and {1} can be used to buy GM for this market up to the specified buying caps." msgstr "" -#: src/components/SubaccountNavigationButton/SubaccountNavigationButton.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/OneClickTrading.tsx msgid "One-Click Trading is not available using network's native token {0}. Consider using {1} instead." msgstr "" @@ -5755,8 +5737,7 @@ msgstr "" #: src/components/Exchange/ConfirmationBox.js #: src/components/Exchange/ConfirmationBox.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/LimitPriceRow.tsx msgid "Limit Price" msgstr "Предельная Цена" @@ -5780,6 +5761,7 @@ msgstr "Не удалось выполнить пополнение счета #: src/components/Exchange/PositionEditor.js #: src/components/Exchange/PositionEditor.js #: src/components/Synthetics/PositionEditor/PositionEditor.tsx +#: src/components/Synthetics/PositionEditor/types.ts #: src/components/Synthetics/TradeHistory/keys.ts #: src/pages/Stake/StakeV2.tsx #: src/pages/Stake/StakeV2.tsx @@ -5815,10 +5797,6 @@ msgstr "Создание Леверидж..." msgid "There may not be sufficient liquidity to execute the swap to the receive token when the price conditions are met." msgstr "" -#: src/components/SubaccountNavigationButton/SubaccountNavigationButton.tsx -msgid "Enable One-Click Trading" -msgstr "" - #: src/components/NotifyModal/NotifyModal.tsx msgid "Trade Errors" msgstr "" @@ -5842,8 +5820,6 @@ msgstr "" #: src/components/Exchange/SwapBox.js #: src/components/Glp/GlpSwap.js #: src/components/Glp/GlpSwap.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/GmSwap/GmConfirmationBox/GmConfirmationBox.tsx #: src/components/Synthetics/GmSwap/GmConfirmationBox/GmConfirmationBox.tsx #: src/components/Synthetics/GmSwap/GmSwapBox/GmSwapBox.tsx @@ -5911,9 +5887,9 @@ msgstr "" msgid "There are insufficient funds in your Subaccount for One-Click Trading. <0>Click here to top-up." msgstr "" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx +#: src/components/Synthetics/TradeBox/hooks/useTradeboxTransactions.tsx +#: src/components/Synthetics/TradeBox/hooks/useTradeboxTransactions.tsx +#: src/components/Synthetics/TradeBox/hooks/useTradeboxTransactions.tsx msgid "Error submitting order" msgstr "" @@ -6009,10 +5985,6 @@ msgstr "" msgid "Rebates" msgstr "" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -msgid "The spread is > 1%, please ensure the trade details are acceptable before comfirming" -msgstr "" - #: src/components/Glp/GlpSwap.js msgid "Sell failed." msgstr "Не удалось продать." @@ -6046,7 +6018,7 @@ msgstr "" msgid "Date" msgstr "Дата" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx +#: src/components/Synthetics/TradeBox/hooks/useTradeWarningsRows.tsx #: src/domain/synthetics/trade/utils/validation.ts #: src/domain/synthetics/trade/utils/validation.ts #: src/domain/synthetics/trade/utils/validation.ts @@ -6086,7 +6058,6 @@ msgid "Price above Mark Price" msgstr "Цена выше Маркированной Цены" #: src/components/Exchange/PositionSeller.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/OrderItem/OrderItem.tsx #: src/components/Synthetics/OrderList/OrderList.tsx #: src/components/Synthetics/PositionSeller/PositionSeller.tsx @@ -6167,7 +6138,7 @@ msgstr "" msgid "The amount left in the subaccount is not enough to cover network gas costs." msgstr "" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/LimitAndTPSLRows.tsx msgid "Take-Profit PnL" msgstr "" @@ -6408,10 +6379,6 @@ msgstr "" #: src/components/Synthetics/Claims/ClaimHistoryRow/ClaimFundingFeesHistoryRow.tsx #: src/components/Synthetics/Claims/ClaimHistoryRow/ClaimFundingFeesHistoryRow.tsx #: src/components/Synthetics/Claims/ClaimsHistory.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/MarketCard/MarketCard.tsx #: src/components/Synthetics/MarketNetFee/MarketNetFee.tsx #: src/components/Synthetics/PositionEditor/PositionEditor.tsx @@ -6554,7 +6521,6 @@ msgid "Failed Settlement of Funding Fees" msgstr "" #: src/components/Exchange/ConfirmationBox.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx msgid "Pay Amount" msgstr "Оплата Суммы" @@ -6624,7 +6590,7 @@ msgstr "" msgid "{ordersText} cancelled" msgstr "" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx +#: src/components/Synthetics/TradeBox/hooks/useTradeButtonState.tsx msgid "Limit price below Mark Price" msgstr "" @@ -6649,7 +6615,7 @@ msgid "Transaction was cancelled." msgstr "Транзакция отменена." #: src/components/Exchange/ConfirmationBox.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx +#: src/components/Synthetics/TradeBox/hooks/useTradeButtonState.tsx msgid "Accept confirmation of trigger orders" msgstr "Принять подтверждение триггерного ордера" @@ -6920,10 +6886,6 @@ msgstr "У вас есть незавершенный перевод от {от msgid "Enter a trigger price" msgstr "" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -msgid "Limit Order Price will vary based on Fees and Price Impact to guarantee the Min. Receive amount." -msgstr "" - #: src/pages/BeginAccountTransfer/BeginAccountTransfer.tsx msgid "Vested GLP not withdrawn" msgstr "Вестинг GLP не выведен" @@ -6935,11 +6897,9 @@ msgstr "Вестинг GLP не выведен" #: src/components/Exchange/PositionsList.js #: src/components/Exchange/SwapBox.js #: src/components/Exchange/SwapBox.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/PositionEditor/PositionEditor.tsx #: src/components/Synthetics/PositionItem/PositionItem.tsx #: src/components/Synthetics/PositionList/PositionList.tsx -#: src/components/Synthetics/TradeBox/TradeBox.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/EntryPriceRow.tsx #: src/pages/LeaderboardPage/components/LeaderboardPositionsTable.tsx msgid "Entry Price" msgstr "Входная Цена" @@ -6962,6 +6922,7 @@ msgstr "" #: src/components/AddressDropdown/AddressDropdown.tsx #: src/components/Synthetics/SubaccountModal/SubaccountModal.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/OneClickTrading.tsx msgid "One-Click Trading" msgstr "" @@ -7025,11 +6986,10 @@ msgid "SELL…" msgstr "" #: src/components/Exchange/ConfirmationBox.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx msgid "Confirm Swap" msgstr "Подтвердить Обмен" -#: src/components/Synthetics/PositionSeller/PositionSeller.tsx +#: src/components/Synthetics/PositionSeller/PositionSellerAdvancedDisplayRows.tsx msgid "Keep leverage is not available as Position exceeds max. allowed leverage. <0>Read more." msgstr "" @@ -7093,6 +7053,10 @@ msgstr "" msgid "<0>The APY is an estimate based on the fees collected for the past seven days, extrapolating the current borrowing fee. It excludes:<1><2>price changes of the underlying token(s)<3>traders' PnL, which is expected to be neutral in the long term<4>funding fees, which are exchanged between traders<5><6>Read more about GM token pricing.<7>Check GM pools' performance against other LP Positions in the <8>GMX Dune Dashboard." msgstr "" +#: src/components/Synthetics/TradeBox/TradeBoxRows/OneClickTrading.tsx +msgid "Top-Up" +msgstr "" + #: src/components/Synthetics/MarketCard/MarketCard.tsx msgid "Ask Price (Exit)" msgstr "" @@ -7105,6 +7069,10 @@ msgstr "" msgid "Orders ({ordersCount})" msgstr "" +#: src/components/Synthetics/TradeBox/hooks/useCollateralInTooltipContent.tsx +msgid "You will be long {indexSymbol} from your long position, as well as from your {collateralSymbol} collateral. The liquidation price is higher compared to using a stablecoin as collateral since the worth of the collateral will change with its price." +msgstr "" + #: src/pages/Ecosystem/Ecosystem.js msgid "GMX explorer for stats and traders" msgstr "Проводник GMX для статистики и трейдеров" @@ -7150,7 +7118,7 @@ msgstr "" msgid "Fee values do not include incentives." msgstr "" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx +#: src/components/Synthetics/TradeBox/hooks/useTradeButtonState.tsx msgid "Limit price above Mark Price" msgstr "" @@ -7166,7 +7134,6 @@ msgstr "" #: src/components/Exchange/SwapBox.js #: src/components/Exchange/SwapBox.js #: src/components/Exchange/SwapBox.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/OrderList/filters/OrderTypeFilter.tsx #: src/components/Synthetics/StatusNotification/OrderStatusNotification.tsx #: src/components/Synthetics/SwapCard/SwapCard.tsx @@ -7328,10 +7295,8 @@ msgstr "" #: src/components/Exchange/PositionSeller.js #: src/components/Exchange/PositionsList.js #: src/components/Exchange/PositionsList.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/OrderItem/OrderItem.tsx #: src/components/Synthetics/OrderList/OrderList.tsx -#: src/components/Synthetics/PositionEditor/PositionEditor.tsx #: src/components/Synthetics/PositionItem/PositionItem.tsx #: src/components/Synthetics/PositionList/PositionList.tsx #: src/components/Synthetics/TradeHistory/useDownloadAsCsv.tsx @@ -7438,7 +7403,7 @@ msgid "short" msgstr "" #: src/components/Exchange/ConfirmationBox.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx +#: src/components/Synthetics/TradeBox/hooks/useTriggerOrdersConsent.tsx msgid "I am aware of the trigger orders" msgstr "Я осведомлён о запуске ордера" @@ -7483,12 +7448,12 @@ msgstr "Цена исполнения ордера" #: src/components/Exchange/ConfirmationBox.js #: src/components/Exchange/PositionSeller.js -#: src/components/Synthetics/ConfirmationBox/rows/AllowedSlippageRow.tsx #: src/components/Synthetics/PositionSeller/rows/AllowedSlippageRow.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/AllowedSlippageRow.tsx msgid "Slippage is too high" msgstr "" -#: src/components/Synthetics/ConfirmationBox/SideOrderEntries.tsx +#: src/components/Synthetics/TradeBox/components/SideOrderEntries.tsx msgid "Add Row" msgstr "" @@ -7543,12 +7508,12 @@ msgstr "" #: src/components/Exchange/OrdersList.js #: src/components/Exchange/OrdersList.js #: src/components/Exchange/SwapBox.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/OrderEditor/OrderEditor.tsx #: src/components/Synthetics/OrderItem/OrderItem.tsx #: src/components/Synthetics/OrderList/filters/OrderTypeFilter.tsx #: src/components/Synthetics/PositionItem/PositionItem.tsx #: src/components/Synthetics/TradeBox/TradeBox.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/LimitAndTPSLRows.tsx #: src/components/Synthetics/TradeHistory/keys.ts msgid "Limit" msgstr "Ограничение" @@ -7571,7 +7536,6 @@ msgid "<0>Insufficient liquidity to execute the order<1>The mark price which msgstr "<0>Недостаточная ликвидность для выполнения заказа<1>Цена маркировки, которая представляет собой средневзвешенную биржевую стоимость, не достигла указанной цены<2>Указанная цена была достигнута, но недостаточно долго для ее выполнения<3>Ни один держатель не взял заказ для исполнения" #: src/components/Exchange/ConfirmationBox.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx msgid "Your position's collateral after deducting fees:" msgstr "Обеспечение вашей позиции после вычета комиссий:" @@ -7621,8 +7585,8 @@ msgstr "" msgid "01 Sep 2021" msgstr "01 Сен 2021" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/OrderList/filters/OrderTypeFilter.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/LimitAndTPSLRows.tsx #: src/domain/synthetics/positions/utils.ts msgid "Take-Profit" msgstr "" diff --git a/src/locales/zh/messages.po b/src/locales/zh/messages.po index 1b58e3fc98..ad5d7aa020 100644 --- a/src/locales/zh/messages.po +++ b/src/locales/zh/messages.po @@ -79,7 +79,6 @@ msgid "Subaccount generation failed" msgstr "" #: src/components/Exchange/ConfirmationBox.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx msgid "{existingTriggerOrderLength, plural, one {You have an active trigger order that might execute immediately after you open this position. Please cancel the order or accept the confirmation to continue.} other {You have # active trigger orders that might execute immediately after you open this position. Please cancel the orders or accept the confirmation to continue.}}" msgstr "{existingTriggerOrderLength, plural, one {You have an active trigger order that might execute immediately after you open this position. Please cancel the order or accept the confirmation to continue.} other {You have # active trigger orders that might execute immediately after you open this position. Please cancel the orders or accept the confirmation to continue.}}" @@ -155,6 +154,10 @@ msgstr "{0}高于其目标重量。<0/><1/>获取较低的费用,以<2>交换< msgid "Withdrawal error." msgstr "" +#: src/components/Synthetics/TradeBox/TradeBox.tsx +msgid "The execution price will constantly vary based on fees and price impact to guarantee that you receive the minimum receive amount." +msgstr "" + #: src/pages/Home/Home.js msgid "Decentralized<0/>Perpetual Exchange" msgstr "去中心化<0/>永续交易所" @@ -236,7 +239,6 @@ msgstr "" #: src/components/Glp/GlpSwap.js #: src/components/Glp/GlpSwap.js #: src/components/Glp/GlpSwap.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/OrderEditor/OrderEditor.tsx #: src/components/Synthetics/TradeFeesRow/TradeFeesRow.tsx msgid "Fees" @@ -403,8 +405,6 @@ msgid "Insufficient liquidity in the {0} market pool. Select a different pool fo msgstr "" #: src/components/Exchange/ConfirmationBox.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx msgid "Confirm Limit Order" msgstr "" @@ -515,6 +515,7 @@ msgstr "" msgid "Incentives are airdropped weekly." msgstr "" +#: src/components/Synthetics/AcceptablePriceImpactInputRow/AcceptablePriceImpactInputRow.tsx #: src/components/Synthetics/AcceptablePriceImpactInputRow/AcceptablePriceImpactInputRow.tsx msgid "Acceptable Price Impact" msgstr "" @@ -527,10 +528,6 @@ msgstr "添加到Metamask" msgid "Insufficient staked tokens" msgstr "" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -msgid "New Collateral" -msgstr "" - #: src/lib/wallets/connecters/binanceW3W/binanceWallet.ts msgid "Tap [Create Wallet] to start using your Web3 Wallet." msgstr "点击[创建钱包]开始使用您的Web3钱包" @@ -721,8 +718,6 @@ msgstr "" #: src/components/Exchange/SwapBox.js #: src/components/Glp/GlpSwap.js #: src/components/Glp/GlpSwap.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/GmSwap/GmConfirmationBox/GmConfirmationBox.tsx #: src/components/Synthetics/GmSwap/GmConfirmationBox/GmConfirmationBox.tsx #: src/components/Synthetics/GmSwap/GmSwapBox/GmSwapBox.tsx @@ -747,8 +742,8 @@ msgstr "GMX治理页面" msgid "Decentralized Money Market" msgstr "" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/OrderList/filters/OrderTypeFilter.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/LimitAndTPSLRows.tsx #: src/domain/synthetics/positions/utils.ts msgid "Stop-Loss" msgstr "" @@ -774,10 +769,6 @@ msgstr "{0}GLP已被保留用于授权" msgid "Buy with {0}" msgstr "以{0}购买" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -msgid "You have an existing position with {0} as collateral. This Order will not be valid for that Position." -msgstr "您有一个现有仓位,抵押品为{0}。此订单不适用于该仓位" - #: src/components/Referrals/JoinReferralCode.js msgid "Adding..." msgstr "添加中" @@ -891,8 +882,8 @@ msgid "Unstake completed!" msgstr "" #: src/components/Exchange/ConfirmationBox.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/OrderEditor/OrderEditor.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/MinReceiveRow.tsx msgid "Min. Receive" msgstr "最低接收" @@ -931,8 +922,6 @@ msgstr "" #: src/components/Exchange/OrdersList.js #: src/components/Exchange/PositionsList.js #: src/components/Exchange/PositionsList.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/MarketStats/MarketStats.tsx #: src/components/Synthetics/OrderItem/OrderItem.tsx #: src/components/Synthetics/PositionItem/PositionItem.tsx @@ -1191,8 +1180,7 @@ msgstr "更新GMX仓位的Telegram机器人" msgid "account" msgstr "帐户" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/TradeBox/TradeBox.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/AdvancedDisplayRows.tsx msgid "Keep leverage at {0}" msgstr "" @@ -1299,6 +1287,10 @@ msgstr "" msgid "Select Positions" msgstr "" +#: src/components/Synthetics/TradeBox/hooks/useCollateralInTooltipContent.tsx +msgid "You will be long {indexSymbol} from your long position, while being long {collateralSymbol} from your {collateralSymbol} collateral. The liquidation price will vary based on the price of {collateralSymbol}." +msgstr "" + #: src/components/Referrals/AffiliatesStats.tsx #: src/components/Referrals/AffiliatesStats.tsx #: src/components/Referrals/TradersStats.tsx @@ -1552,7 +1544,7 @@ msgstr "" msgid "Mark" msgstr "" -#: src/components/Synthetics/PositionSeller/PositionSeller.tsx +#: src/components/Synthetics/PositionSeller/PositionSellerAdvancedDisplayRows.tsx msgid "Keep leverage at {keepLeverageAtValue}" msgstr "" @@ -1708,7 +1700,7 @@ msgstr "检查代码..." msgid "GM Pools" msgstr "" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/AvailableLiquidityRow.tsx msgid "The order will only execute if the price conditions are met and there is sufficient liquidity." msgstr "" @@ -1747,16 +1739,14 @@ msgstr "" #: src/components/Exchange/PositionsList.js #: src/components/Synthetics/Claims/ClaimsHistory.tsx #: src/components/Synthetics/Claims/ClaimsHistory.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/OrderEditor/OrderEditor.tsx #: src/components/Synthetics/OrderItem/OrderItem.tsx #: src/components/Synthetics/OrderList/OrderList.tsx -#: src/components/Synthetics/PositionEditor/PositionEditor.tsx +#: src/components/Synthetics/PositionEditor/PositionEditorAdvancedRows.tsx #: src/components/Synthetics/PositionItem/PositionItem.tsx #: src/components/Synthetics/PositionList/PositionList.tsx -#: src/components/Synthetics/PositionSeller/PositionSeller.tsx -#: src/components/Synthetics/TradeBox/TradeBox.tsx +#: src/components/Synthetics/PositionSeller/PositionSellerAdvancedDisplayRows.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/AdvancedDisplayRows.tsx #: src/components/Synthetics/TradeHistory/TradeHistory.tsx #: src/components/Synthetics/TradeHistory/useDownloadAsCsv.tsx #: src/pages/LeaderboardPage/components/LeaderboardPositionsTable.tsx @@ -1894,6 +1884,11 @@ msgstr "" msgid "{0} Approved!" msgstr "{0} 通过!" +#: src/components/Synthetics/PositionEditor/PositionEditorAdvancedRows.tsx +#: src/components/Synthetics/PositionSeller/PositionSellerAdvancedDisplayRows.tsx +msgid "Advanced display" +msgstr "" + #: src/components/Exchange/SwapBox.js msgid "Long {0}" msgstr "做多 {0}" @@ -1917,7 +1912,7 @@ msgid "Total Trading Volume" msgstr "总交易量" #: src/components/Exchange/ConfirmationBox.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/CollateralSpreadRow.tsx msgid "Collateral Spread" msgstr "" @@ -2001,10 +1996,6 @@ msgstr "" msgid "Allow {0} to be spent" msgstr "" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -msgid "You have an existing position with {0} as collateral. This action will not apply for that position." -msgstr "您有一个现有仓位,抵押品为{0}。此操作不适用于该仓位" - #: src/components/Exchange/SwapBox.js msgid "Swap Order created!" msgstr "创建了交易订单" @@ -2053,7 +2044,7 @@ msgstr "" msgid "{existingTriggerOrderLength, plural, one {You have an active trigger order that could impact this position.} other {You have # active trigger orders that could impact this position.}}" msgstr "{existingTriggerOrderLength, plural, one {You have an active trigger order that could impact this position.} other {You have # active trigger orders that could impact this position.}}" -#: src/components/SubaccountNavigationButton/SubaccountNavigationButton.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/OneClickTrading.tsx msgid "Reduce wallet signing popups with One-Click Trading. This option is also available through the Wallet menu in the top right. <0>Read more." msgstr "通过一键交易减少钱包签名弹出窗口。此选项也可通过右上角的钱包菜单获得。" @@ -2069,7 +2060,6 @@ msgstr "" msgid "Swap {0} USDG for{1} {2}" msgstr "" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/OrderItem/OrderItem.tsx msgid "{0} will be swapped to {1} on order execution." msgstr "" @@ -2127,8 +2117,6 @@ msgstr "" #: src/components/Exchange/ConfirmationBox.js #: src/components/Exchange/SwapBox.js #: src/components/Exchange/SwapBox.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/SwapCard/SwapCard.tsx #: src/components/Synthetics/SwapCard/SwapCard.tsx msgid "{0} Price" @@ -2237,6 +2225,10 @@ msgstr "价格低于标价" msgid "APRs are updated weekly on Wednesday and will depend on the fees collected for the week." msgstr "年利率每周三更新一次,具体数量取决于当周收取的费用" +#: src/components/Synthetics/TradeBox/TradeBoxRows/AdvancedDisplayRows.tsx +msgid "Advanced Display" +msgstr "" + #: src/components/Synthetics/SubaccountModal/utils.ts msgid "Generate & Activate Subaccount" msgstr "" @@ -2294,7 +2286,6 @@ msgid "Couldn't find a swap route with enough liquidity" msgstr "" #: src/components/Exchange/ConfirmationBox.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx msgid "Confirm Long" msgstr "确认做多" @@ -2345,6 +2336,10 @@ msgstr "可提取的GLP数量. 资金未被当前开仓所使用." msgid "Invalid price, see warning" msgstr "无效的价格,请参阅警告" +#: src/components/Synthetics/TradeBox/hooks/useCollateralInTooltipContent.tsx +msgid "You will be short {indexSymbol} only from your short position." +msgstr "" + #: src/pages/Actions/ActionsV1/ActionsV1.tsx msgid "GMX V1 {networkName} actions for all accounts." msgstr "" @@ -2361,6 +2356,10 @@ msgstr "" msgid "You need to select {swapTokenSymbol} as the \"Pay\" token to use it for collateral to initiate this trade." msgstr "你需要选择 {swapTokenSymbol} 作为 \"Pay\" 代币 以将它作为抵押品来启动这个交易" +#: src/components/Synthetics/TradeBox/TradeBoxRows/LimitAndTPSLRows.tsx +msgid "There are issues in the TP/SL orders." +msgstr "" + #: src/components/Glp/GlpSwap.js msgid "The Bonus Rebate is an estimate and will be airdropped as ARB tokens when migrating this liquidity to GM pools within the same epoch. <0>Read more." msgstr "" @@ -2398,9 +2397,12 @@ msgstr "当前池子里的金额" msgid "Cancel failed." msgstr "取消失败" +#: src/components/Synthetics/TradeBox/TradeBoxRows/AvailableLiquidityRow.tsx +msgid "The order will be executed if there is sufficient liquidity and the execution price guarantees that you will receive the minimum receive amount." +msgstr "" + #: src/components/Exchange/ConfirmationBox.js #: src/components/Exchange/PositionSeller.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx msgid "Transacting with a depegged stable coin is subject to spreads reflecting the worse of current market price or $1.00, with transactions involving multiple stablecoins may have multiple spreads." msgstr "" @@ -2445,10 +2447,6 @@ msgstr "选择市场" msgid "Open positions: {0}<0/>Under risk: {1}" msgstr "未结头寸: {0}<0/>风险之下: {1}" -#: src/components/SubaccountNavigationButton/SubaccountNavigationButton.tsx -msgid "There are insufficient funds in your Subaccount for One-Click Trading. Click here to top-up." -msgstr "" - #: src/components/Exchange/UsefulLinks.tsx msgid "Speed up page loading" msgstr "加速页面加载" @@ -2517,10 +2515,6 @@ msgstr "交易" msgid "Adding referral code failed." msgstr "添加推荐代码失败" -#: src/components/SubaccountNavigationButton/SubaccountNavigationButton.tsx -msgid "The previously authorized maximum number of Actions has been reached for One-Click Trading. Click here to re-authorize." -msgstr "" - #: src/components/Exchange/PositionEditor.js msgid "Max leverage without PnL: {0}x" msgstr "" @@ -2680,13 +2674,12 @@ msgstr "" #: src/components/Exchange/PositionSeller.js #: src/components/Exchange/SwapBox.js #: src/components/Exchange/SwapBox.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/OrderEditor/OrderEditor.tsx -#: src/components/Synthetics/PositionEditor/PositionEditor.tsx -#: src/components/Synthetics/PositionSeller/PositionSeller.tsx -#: src/components/Synthetics/TradeBox/TradeBox.tsx -#: src/components/Synthetics/TradeBox/TradeBox.tsx +#: src/components/Synthetics/PositionEditor/PositionEditorAdvancedRows.tsx +#: src/components/Synthetics/PositionSeller/PositionSellerAdvancedDisplayRows.tsx #: src/components/Synthetics/TradeBox/TradeBox.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/AdvancedDisplayRows.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/AdvancedDisplayRows.tsx msgid "Leverage" msgstr "杠杆" @@ -2791,10 +2784,6 @@ msgstr "" msgid "Claim failed." msgstr "领取失败" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -msgid "You have selected {collateralTokenSymbol} as collateral; the liquidation price is higher compared to using a stablecoin as collateral since the worth of the collateral will change with its price. If required and available, you can change the collateral type using the \"Collateral In\" option in the trade box." -msgstr "您选择了{collateralTokenSymbol}作为抵押品;与使用稳定币作为抵押品相比,清算价格更高,因为抵押品的价值将随其价格变化。如果需要且可用,您可以在交易框中的\"抵押品\"选项中更改抵押品类型。" - #: src/components/Synthetics/Claims/SettleAccruedCard.tsx msgid "Accrued Price Impact Rebates. They will become Claimable after some time.<0/><1/><2>Read more." msgstr "" @@ -2861,10 +2850,6 @@ msgstr "" msgid "GM can be sold for {0} and {1} for this market up to the specified selling caps. The remaining tokens in the pool are reserved for currently open positions." msgstr "" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -msgid "Collateral value may differ due to different Price Impact at the time of execution." -msgstr "" - #: src/components/Synthetics/ExecutionPriceRow.tsx #: src/components/Synthetics/TradeHistory/TradeHistoryRow/utils/position.ts #: src/components/Synthetics/TradeHistory/TradeHistoryRow/utils/position.ts @@ -2967,6 +2952,10 @@ msgstr "在Arbitrum上授权GMX" msgid "{longOrShort} positions {fundingAction} a funding fee of {fundingRate} per hour and {borrowAction} a borrow fee of {borrowRate} per hour." msgstr "" +#: src/components/Synthetics/TradeBox/TradeBoxRows/LimitAndTPSLRows.tsx +msgid "Limit / TP / SL" +msgstr "" + #: src/components/Exchange/OrderEditor.js #: src/components/Synthetics/OrderEditor/OrderEditor.tsx msgid "Updating Order..." @@ -3029,8 +3018,8 @@ msgstr "暂时没有交易" #: src/components/Exchange/ConfirmationBox.js #: src/components/Exchange/PositionSeller.js #: src/components/SettingsModal/SettingsModal.tsx -#: src/components/Synthetics/ConfirmationBox/rows/AllowedSlippageRow.tsx #: src/components/Synthetics/PositionSeller/rows/AllowedSlippageRow.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/AllowedSlippageRow.tsx msgid "Allowed Slippage" msgstr "允许的滑点" @@ -3147,12 +3136,11 @@ msgstr "交易送出" #: src/components/Exchange/PositionSeller.js #: src/components/Exchange/PositionsList.js #: src/components/Exchange/TradeHistory.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/PositionItem/PositionItem.tsx #: src/components/Synthetics/PositionItem/PositionItem.tsx -#: src/components/Synthetics/PositionSeller/PositionSeller.tsx -#: src/components/Synthetics/PositionSeller/PositionSeller.tsx -#: src/components/Synthetics/TradeBox/TradeBox.tsx +#: src/components/Synthetics/PositionSeller/PositionSellerAdvancedDisplayRows.tsx +#: src/components/Synthetics/PositionSeller/PositionSellerAdvancedDisplayRows.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/AdvancedDisplayRows.tsx #: src/components/Synthetics/TradeHistory/TradeHistoryRow/utils/position.ts #: src/pages/AccountDashboard/DailyAndCumulativePnL.tsx #: src/pages/Actions/ActionsV1/ActionsV1.tsx @@ -3176,6 +3164,7 @@ msgstr "" #: src/components/Exchange/PositionEditor.js #: src/components/Exchange/PositionEditor.js #: src/components/Synthetics/PositionEditor/PositionEditor.tsx +#: src/components/Synthetics/PositionEditor/types.ts #: src/components/Synthetics/SubaccountModal/SubaccountModal.tsx #: src/components/Synthetics/TradeHistory/keys.ts #: src/pages/Stake/StakeV2.tsx @@ -3261,8 +3250,8 @@ msgstr "该仓位将在 {0} USD 开仓,最大滑点为{1}%.<0/><1/>滑点金额 msgid "Active Referral Code" msgstr "有效推荐代码" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/PositionEditor/PositionEditor.tsx +#: src/components/Synthetics/TradeBox/hooks/useTradeWarningsRows.tsx msgid "Pending {0} approval" msgstr "" @@ -3274,6 +3263,10 @@ msgstr "请将您的网络切换到Arbitrum" msgid "The position would be immediately liquidated upon order execution. Try reducing the size." msgstr "" +#: src/components/Synthetics/TradeBox/TradeBoxRows/OneClickTrading.tsx +msgid "Enable" +msgstr "" + #: src/components/Synthetics/GmList/GmList.tsx #: src/components/Synthetics/MarketTokenSelector/MarketTokenSelector.tsx msgid "BUYABLE" @@ -3305,6 +3298,10 @@ msgstr "" msgid "You have yet to reach the minimum \"Capital Used\" of {0} to qualify for the rankings." msgstr "" +#: src/components/Synthetics/TradeBox/TradeBoxRows/LimitPriceRow.tsx +msgid "The execution price for the limit order updates in real-time on the orders tab after order creation to guarantee that you receive the minimum receive amount." +msgstr "" + #: src/components/Exchange/SwapBox.js msgid "Swap amount exceeds Available Liquidity." msgstr "" @@ -3326,8 +3323,8 @@ msgstr "上一页" msgid "Unknown buy GM order" msgstr "" -#: src/components/Synthetics/ConfirmationBox/rows/AllowedSlippageRow.tsx #: src/components/Synthetics/PositionSeller/rows/AllowedSlippageRow.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/AllowedSlippageRow.tsx msgid "You can edit the default Allowed Slippage in the settings menu on the top right of the page.<0/><1/>Note that a low allowed slippage, e.g. less than -{0}, may result in failed orders if prices are volatile." msgstr "" @@ -3363,7 +3360,7 @@ msgstr "赚取" #: src/components/Exchange/SwapBox.js #: src/components/Synthetics/CollateralSelector/CollateralSelector.tsx #: src/components/Synthetics/CollateralSelector/CollateralSelector.tsx -#: src/components/Synthetics/TradeBox/CollateralSelectorRow.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/CollateralSelectorRow.tsx msgid "Collateral In" msgstr "抵押品进入" @@ -3383,8 +3380,8 @@ msgstr "交易指南" msgid "TRADING Airdrop" msgstr "" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -msgid "Limit Order Price to guarantee Min. Receive amount is updated in real time in the Orders tab after the order has been created." +#: src/components/Synthetics/TradeBox/hooks/useCollateralInTooltipContent.tsx +msgid "You will be short {indexSymbol} from your short position, while being long {collateralSymbol} from your {collateralSymbol} collateral. This can be useful for delta-neutral strategies to earn funding fees." msgstr "" #: src/components/Referrals/TradersStats.tsx @@ -3445,8 +3442,8 @@ msgstr "" msgid "The Execution Price didn't meet the Acceptable Price condition. The Order will get filled when the condition is met." msgstr "执行价格未满足可接受价格条件。当条件满足时,订单将被填充" -#: src/components/Synthetics/PositionEditor/PositionEditor.tsx -#: src/components/Synthetics/PositionSeller/PositionSeller.tsx +#: src/components/Synthetics/PositionEditor/PositionEditorAdvancedRows.tsx +#: src/components/Synthetics/PositionSeller/PositionSellerAdvancedDisplayRows.tsx msgid "Initial Collateral (Collateral excluding Borrow and Funding Fee)." msgstr "" @@ -3466,15 +3463,15 @@ msgstr "结构化产品" #: src/components/AprInfo/AprInfo.tsx #: src/components/AprInfo/AprInfo.tsx #: src/components/Synthetics/AcceptablePriceImpactInputRow/AcceptablePriceImpactInputRow.tsx -#: src/components/Synthetics/PositionSeller/PositionSeller.tsx -#: src/components/Synthetics/TradeBox/TradeBox.tsx +#: src/components/Synthetics/PositionSeller/PositionSellerAdvancedDisplayRows.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/AdvancedDisplayRows.tsx #: src/pages/LeaderboardPage/components/LeaderboardAccountsTable.tsx #: src/pages/LeaderboardPage/components/LeaderboardPositionsTable.tsx #: src/pages/LeaderboardPage/components/LeaderboardPositionsTable.tsx msgid "NA" msgstr "" -#: src/components/Synthetics/TradeBox/CollateralSelectorRow.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/CollateralSelectorRow.tsx msgid "You have an existing position with {0} as collateral. This action will not apply for that position. <0>Switch to {1} collateral." msgstr "" @@ -3511,10 +3508,6 @@ msgstr "订单的触发价格" #: src/components/Synthetics/Claims/ClaimHistoryRow/ClaimFundingFeesHistoryRow.tsx #: src/components/Synthetics/Claims/ClaimHistoryRow/ClaimFundingFeesHistoryRow.tsx #: src/components/Synthetics/Claims/ClaimsHistory.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/MarketCard/MarketCard.tsx #: src/components/Synthetics/MarketNetFee/MarketNetFee.tsx #: src/components/Synthetics/PositionEditor/PositionEditor.tsx @@ -3587,8 +3580,6 @@ msgstr "" #: src/components/Exchange/PositionsList.js #: src/components/Exchange/PositionsList.js #: src/components/Exchange/SwapBox.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/OrderEditor/OrderEditor.tsx #: src/components/Synthetics/PositionEditor/PositionEditor.tsx #: src/components/Synthetics/PositionItem/PositionItem.tsx @@ -3659,10 +3650,6 @@ msgstr "在GMX上进行交易,赢取<0>$250.000 美元的奖金! 活动至 msgid "You are leaving GMX.io and will be redirected to a third party, independent website." msgstr "您正要离开GMX.io,并且将被重新导向到第三方独立网站" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -msgid "You have selected {collateralTokenSymbol} as collateral to short {indexTokenSymbol}." -msgstr "" - #: src/components/Synthetics/PositionItem/PositionItem.tsx #: src/components/Synthetics/PositionItem/PositionItem.tsx msgid "Accrued Borrow Fee" @@ -3698,10 +3685,10 @@ msgstr "" msgid "<0>Notifications are provided by Notifi and not affiliated with GMX. By subscribing, you agree that info you provide to Notifi will be governed by its <1>Privacy Policy<2> and <3>Terms of Use." msgstr "" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/GmSwap/GmConfirmationBox/GmConfirmationBox.tsx #: src/components/Synthetics/PositionEditor/PositionEditor.tsx #: src/components/Synthetics/PositionSeller/PositionSeller.tsx +#: src/components/Synthetics/TradeBox/hooks/useTradeWarningsRows.tsx msgid "High Network Fee not yet acknowledged" msgstr "" @@ -3742,11 +3729,6 @@ msgstr "" msgid "UI Fee" msgstr "" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -msgid "Confirm {0} Order" -msgstr "" - #: src/domain/synthetics/orders/simulateExecuteOrderTxn.tsx #: src/domain/synthetics/orders/simulateExecuteOrderTxn.tsx msgid "Execute order simulation failed." @@ -3791,9 +3773,10 @@ msgstr "" #: src/components/Exchange/ConfirmationBox.js #: src/components/Exchange/PositionSeller.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/PositionEditor/PositionEditor.tsx #: src/components/Synthetics/PositionSeller/PositionSeller.tsx +#: src/components/Synthetics/TradeBox/hooks/useTradeButtonState.tsx +#: src/components/Synthetics/TradeBox/TradeBox.tsx msgid "Creating Order..." msgstr "创建指令中..." @@ -4058,7 +4041,6 @@ msgstr "已减少" #: src/components/Exchange/OrdersList.js #: src/components/Exchange/TradeHistory.js #: src/components/Exchange/TradeHistory.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/domain/synthetics/orders/utils.tsx #: src/pages/OrdersOverview/OrdersOverview.js msgid "Decrease" @@ -4093,11 +4075,15 @@ msgstr "Dec" msgid "GMX Weekly Updates" msgstr "GMX每周更新" +#: src/components/Synthetics/TradeBox/hooks/useCollateralInTooltipContent.tsx +msgid "You will be long {indexSymbol} only from your long position." +msgstr "" + #: src/pages/OrdersOverview/OrdersOverview.js msgid "Total active: {openTotal}, executed: {executedTotal}, cancelled: {cancelledTotal}" msgstr "活跃总数: {openTotal}, 已执行: {executedTotal}, 已取消: {cancelledTotal}" -#: src/components/Synthetics/TradeBox/CollateralSelectorRow.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/CollateralSelectorRow.tsx msgid "You have an existing order with {symbol} as collateral. <0>Switch to {symbol} collateral." msgstr "" @@ -4132,7 +4118,7 @@ msgstr "" msgid "Yield simulator for GMX" msgstr "GMX的产量模拟器" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/AvailableLiquidityRow.tsx msgid "There may not be sufficient liquidity to execute your order when the Min. Receive are met." msgstr "" @@ -4178,9 +4164,9 @@ msgstr "" #: src/components/Exchange/SwapBox.js #: src/components/Exchange/SwapBox.js #: src/components/Exchange/SwapBox.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/MarketCard/MarketCard.tsx #: src/components/Synthetics/SwapCard/SwapCard.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/AvailableLiquidityRow.tsx msgid "Available Liquidity" msgstr "可用的流动资金" @@ -4269,12 +4255,9 @@ msgstr "" #: src/components/Exchange/ConfirmationBox.js #: src/components/Exchange/PositionEditor.js #: src/components/Exchange/PositionSeller.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/PositionEditor/PositionEditor.tsx -#: src/components/Synthetics/PositionSeller/PositionSeller.tsx -#: src/components/Synthetics/TradeBox/TradeBox.tsx +#: src/components/Synthetics/PositionEditor/PositionEditorAdvancedRows.tsx +#: src/components/Synthetics/PositionSeller/PositionSellerAdvancedDisplayRows.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/AdvancedDisplayRows.tsx msgid "Collateral ({0})" msgstr "抵押品({0})" @@ -4286,6 +4269,14 @@ msgstr "" msgid "Order updated!" msgstr "指令已更新" +#: src/components/Synthetics/TradeBox/hooks/useCollateralInTooltipContent.tsx +msgid "You will be short {indexSymbol} from your short position, while being long {collateralSymbol} from your {collateralSymbol} collateral. The liquidation price will vary based on the price of {collateralSymbol}." +msgstr "" + +#: src/components/Synthetics/TradeBox/TradeBoxRows/OneClickTrading.tsx +msgid "The previously authorized maximum number of actions has been reached for One-Click Trading." +msgstr "" + #: src/components/Synthetics/CollateralSelector/CollateralSelector.tsx #: src/components/Synthetics/CollateralSelector/CollateralSelector.tsx msgid "Select a pool containing {0} to use it as collateral." @@ -4324,7 +4315,6 @@ msgid "Max Leverage without PnL: 100x" msgstr "" #: src/components/Exchange/ConfirmationBox.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx msgid "Confirm Short" msgstr "确认做空" @@ -4340,10 +4330,6 @@ msgstr "" msgid "Order Type" msgstr "" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -msgid "Decrease size" -msgstr "" - #: src/components/Synthetics/StatusNotification/GmStatusNotification.tsx msgid "Sell order executed" msgstr "" @@ -4360,13 +4346,9 @@ msgstr "" msgid "Affiliate Rewards Claimed" msgstr "" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -msgid "Old Collateral" -msgstr "" - #: src/components/Exchange/ConfirmationBox.js #: src/components/Exchange/PositionSeller.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/SwapSpreadRow.tsx msgid "Spread" msgstr "分散" @@ -4402,6 +4384,10 @@ msgstr "加载中..." msgid "Leaderboard for GMX traders" msgstr "GMX交易者排行榜" +#: src/components/Synthetics/TradeBox/TradeBoxRows/OneClickTrading.tsx +msgid "There are insufficient funds in your subaccount for One-Click Trading" +msgstr "" + #: src/components/Exchange/PositionsList.js msgid "Share" msgstr "分享" @@ -4546,7 +4532,7 @@ msgstr "" msgid "GLP autocompounding vaults" msgstr "" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx +#: src/components/Synthetics/TradeBox/hooks/useTradeButtonState.tsx msgid "TP/SL orders exceed the position" msgstr "" @@ -4575,7 +4561,7 @@ msgstr "在平仓时,你可以选择你想用哪种代币来接收利润" msgid "Top PnL (%)" msgstr "" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/AvailableLiquidityRow.tsx #: src/domain/synthetics/orders/utils.tsx msgid "There may not be sufficient liquidity to execute your order when the price conditions are met." msgstr "" @@ -4774,7 +4760,7 @@ msgstr "" msgid "Begin Transfer" msgstr "开始转移" -#: src/components/SubaccountNavigationButton/SubaccountNavigationButton.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/OneClickTrading.tsx msgid "One-Click Trading is not available for wrapping or unwrapping native token {0}." msgstr "" @@ -4823,7 +4809,7 @@ msgstr "" msgid "Cancel" msgstr "取消" -#: src/components/Synthetics/ConfirmationBox/SideOrderEntries.tsx +#: src/components/Synthetics/TradeBox/components/SideOrderEntries.tsx msgid "Remove Row" msgstr "" @@ -4849,10 +4835,6 @@ msgstr "订单已取消" msgid "Buy or Transfer AVAX to Avalanche" msgstr "" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -msgid "You have selected {collateralTokenSymbol} as Collateral, the Liquidation Price will vary based on the price of {collateralTokenSymbol}." -msgstr "" - #: src/pages/Ecosystem/Ecosystem.js msgid "Telegram bot for Open Interest on GMX" msgstr "GMX上未平仓合约的电报机器人" @@ -4903,7 +4885,7 @@ msgstr "" msgid "Enter new amount or price" msgstr "" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/LimitAndTPSLRows.tsx msgid "Stop-Loss PnL" msgstr "" @@ -5034,7 +5016,7 @@ msgstr "您推荐交易者的交易量" msgid "Stablecoin Percentage" msgstr "稳定币百分比" -#: src/components/Synthetics/TradeBox/CollateralSelectorRow.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/CollateralSelectorRow.tsx msgid "You have an existing position with {0} as collateral. This Order will not be valid for that Position. <0>Switch to {1} collateral." msgstr "" @@ -5269,6 +5251,10 @@ msgstr "" msgid "Claim esGMX" msgstr "领取esGMX" +#: src/components/Synthetics/TradeBox/TradeBoxRows/OneClickTrading.tsx +msgid "Re-authorize" +msgstr "" + #: src/pages/BuyGMX/BuyGMX.tsx msgid "Buy or Transfer ETH to Arbitrum" msgstr "" @@ -5449,10 +5435,6 @@ msgstr "" msgid "Max Out" msgstr "" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -msgid "The order will only execute if the Min. Receive is met and there is sufficient liquidity." -msgstr "" - #: src/components/Exchange/PositionEditor.js #: src/components/Exchange/PositionSeller.js #: src/components/Exchange/PositionSeller.js @@ -5677,7 +5659,7 @@ msgstr "" msgid "{0} and {1} can be used to buy GM for this market up to the specified buying caps." msgstr "" -#: src/components/SubaccountNavigationButton/SubaccountNavigationButton.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/OneClickTrading.tsx msgid "One-Click Trading is not available using network's native token {0}. Consider using {1} instead." msgstr "" @@ -5755,8 +5737,7 @@ msgstr "" #: src/components/Exchange/ConfirmationBox.js #: src/components/Exchange/ConfirmationBox.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/LimitPriceRow.tsx msgid "Limit Price" msgstr "限制价格" @@ -5780,6 +5761,7 @@ msgstr "无法执行存入 {0} {longOrShortText}" #: src/components/Exchange/PositionEditor.js #: src/components/Exchange/PositionEditor.js #: src/components/Synthetics/PositionEditor/PositionEditor.tsx +#: src/components/Synthetics/PositionEditor/types.ts #: src/components/Synthetics/TradeHistory/keys.ts #: src/pages/Stake/StakeV2.tsx #: src/pages/Stake/StakeV2.tsx @@ -5815,10 +5797,6 @@ msgstr "启用杠杆功能中..." msgid "There may not be sufficient liquidity to execute the swap to the receive token when the price conditions are met." msgstr "" -#: src/components/SubaccountNavigationButton/SubaccountNavigationButton.tsx -msgid "Enable One-Click Trading" -msgstr "" - #: src/components/NotifyModal/NotifyModal.tsx msgid "Trade Errors" msgstr "" @@ -5842,8 +5820,6 @@ msgstr "" #: src/components/Exchange/SwapBox.js #: src/components/Glp/GlpSwap.js #: src/components/Glp/GlpSwap.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/GmSwap/GmConfirmationBox/GmConfirmationBox.tsx #: src/components/Synthetics/GmSwap/GmConfirmationBox/GmConfirmationBox.tsx #: src/components/Synthetics/GmSwap/GmSwapBox/GmSwapBox.tsx @@ -5911,9 +5887,9 @@ msgstr "" msgid "There are insufficient funds in your Subaccount for One-Click Trading. <0>Click here to top-up." msgstr "" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx +#: src/components/Synthetics/TradeBox/hooks/useTradeboxTransactions.tsx +#: src/components/Synthetics/TradeBox/hooks/useTradeboxTransactions.tsx +#: src/components/Synthetics/TradeBox/hooks/useTradeboxTransactions.tsx msgid "Error submitting order" msgstr "" @@ -6009,10 +5985,6 @@ msgstr "" msgid "Rebates" msgstr "" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -msgid "The spread is > 1%, please ensure the trade details are acceptable before comfirming" -msgstr "" - #: src/components/Glp/GlpSwap.js msgid "Sell failed." msgstr "出售失败" @@ -6046,7 +6018,7 @@ msgstr "" msgid "Date" msgstr "日期" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx +#: src/components/Synthetics/TradeBox/hooks/useTradeWarningsRows.tsx #: src/domain/synthetics/trade/utils/validation.ts #: src/domain/synthetics/trade/utils/validation.ts #: src/domain/synthetics/trade/utils/validation.ts @@ -6086,7 +6058,6 @@ msgid "Price above Mark Price" msgstr "价格高于标价" #: src/components/Exchange/PositionSeller.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/OrderItem/OrderItem.tsx #: src/components/Synthetics/OrderList/OrderList.tsx #: src/components/Synthetics/PositionSeller/PositionSeller.tsx @@ -6167,7 +6138,7 @@ msgstr "" msgid "The amount left in the subaccount is not enough to cover network gas costs." msgstr "" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/LimitAndTPSLRows.tsx msgid "Take-Profit PnL" msgstr "" @@ -6408,10 +6379,6 @@ msgstr "" #: src/components/Synthetics/Claims/ClaimHistoryRow/ClaimFundingFeesHistoryRow.tsx #: src/components/Synthetics/Claims/ClaimHistoryRow/ClaimFundingFeesHistoryRow.tsx #: src/components/Synthetics/Claims/ClaimsHistory.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/MarketCard/MarketCard.tsx #: src/components/Synthetics/MarketNetFee/MarketNetFee.tsx #: src/components/Synthetics/PositionEditor/PositionEditor.tsx @@ -6554,7 +6521,6 @@ msgid "Failed Settlement of Funding Fees" msgstr "" #: src/components/Exchange/ConfirmationBox.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx msgid "Pay Amount" msgstr "支付金额" @@ -6624,7 +6590,7 @@ msgstr "" msgid "{ordersText} cancelled" msgstr "" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx +#: src/components/Synthetics/TradeBox/hooks/useTradeButtonState.tsx msgid "Limit price below Mark Price" msgstr "" @@ -6649,7 +6615,7 @@ msgid "Transaction was cancelled." msgstr "交易已取消" #: src/components/Exchange/ConfirmationBox.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx +#: src/components/Synthetics/TradeBox/hooks/useTradeButtonState.tsx msgid "Accept confirmation of trigger orders" msgstr "接受并确认触发订单" @@ -6920,10 +6886,6 @@ msgstr "您有一个来自{sender}的待处理转账" msgid "Enter a trigger price" msgstr "" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -msgid "Limit Order Price will vary based on Fees and Price Impact to guarantee the Min. Receive amount." -msgstr "" - #: src/pages/BeginAccountTransfer/BeginAccountTransfer.tsx msgid "Vested GLP not withdrawn" msgstr "归属的GLP未被撤回" @@ -6935,11 +6897,9 @@ msgstr "归属的GLP未被撤回" #: src/components/Exchange/PositionsList.js #: src/components/Exchange/SwapBox.js #: src/components/Exchange/SwapBox.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx -#: src/components/Synthetics/PositionEditor/PositionEditor.tsx #: src/components/Synthetics/PositionItem/PositionItem.tsx #: src/components/Synthetics/PositionList/PositionList.tsx -#: src/components/Synthetics/TradeBox/TradeBox.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/EntryPriceRow.tsx #: src/pages/LeaderboardPage/components/LeaderboardPositionsTable.tsx msgid "Entry Price" msgstr "入场价格" @@ -6962,6 +6922,7 @@ msgstr "" #: src/components/AddressDropdown/AddressDropdown.tsx #: src/components/Synthetics/SubaccountModal/SubaccountModal.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/OneClickTrading.tsx msgid "One-Click Trading" msgstr "" @@ -7025,11 +6986,10 @@ msgid "SELL…" msgstr "" #: src/components/Exchange/ConfirmationBox.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx msgid "Confirm Swap" msgstr "确认交换" -#: src/components/Synthetics/PositionSeller/PositionSeller.tsx +#: src/components/Synthetics/PositionSeller/PositionSellerAdvancedDisplayRows.tsx msgid "Keep leverage is not available as Position exceeds max. allowed leverage. <0>Read more." msgstr "" @@ -7093,6 +7053,10 @@ msgstr "" msgid "<0>The APY is an estimate based on the fees collected for the past seven days, extrapolating the current borrowing fee. It excludes:<1><2>price changes of the underlying token(s)<3>traders' PnL, which is expected to be neutral in the long term<4>funding fees, which are exchanged between traders<5><6>Read more about GM token pricing.<7>Check GM pools' performance against other LP Positions in the <8>GMX Dune Dashboard." msgstr "" +#: src/components/Synthetics/TradeBox/TradeBoxRows/OneClickTrading.tsx +msgid "Top-Up" +msgstr "" + #: src/components/Synthetics/MarketCard/MarketCard.tsx msgid "Ask Price (Exit)" msgstr "" @@ -7105,6 +7069,10 @@ msgstr "" msgid "Orders ({ordersCount})" msgstr "" +#: src/components/Synthetics/TradeBox/hooks/useCollateralInTooltipContent.tsx +msgid "You will be long {indexSymbol} from your long position, as well as from your {collateralSymbol} collateral. The liquidation price is higher compared to using a stablecoin as collateral since the worth of the collateral will change with its price." +msgstr "" + #: src/pages/Ecosystem/Ecosystem.js msgid "GMX explorer for stats and traders" msgstr "用于统计和交易的GMX探索器" @@ -7150,7 +7118,7 @@ msgstr "" msgid "Fee values do not include incentives." msgstr "" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx +#: src/components/Synthetics/TradeBox/hooks/useTradeButtonState.tsx msgid "Limit price above Mark Price" msgstr "" @@ -7166,7 +7134,6 @@ msgstr "" #: src/components/Exchange/SwapBox.js #: src/components/Exchange/SwapBox.js #: src/components/Exchange/SwapBox.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/OrderList/filters/OrderTypeFilter.tsx #: src/components/Synthetics/StatusNotification/OrderStatusNotification.tsx #: src/components/Synthetics/SwapCard/SwapCard.tsx @@ -7328,10 +7295,8 @@ msgstr "" #: src/components/Exchange/PositionSeller.js #: src/components/Exchange/PositionsList.js #: src/components/Exchange/PositionsList.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/OrderItem/OrderItem.tsx #: src/components/Synthetics/OrderList/OrderList.tsx -#: src/components/Synthetics/PositionEditor/PositionEditor.tsx #: src/components/Synthetics/PositionItem/PositionItem.tsx #: src/components/Synthetics/PositionList/PositionList.tsx #: src/components/Synthetics/TradeHistory/useDownloadAsCsv.tsx @@ -7438,7 +7403,7 @@ msgid "short" msgstr "" #: src/components/Exchange/ConfirmationBox.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx +#: src/components/Synthetics/TradeBox/hooks/useTriggerOrdersConsent.tsx msgid "I am aware of the trigger orders" msgstr "我了解触发的指令" @@ -7483,12 +7448,12 @@ msgstr "订单执行价格" #: src/components/Exchange/ConfirmationBox.js #: src/components/Exchange/PositionSeller.js -#: src/components/Synthetics/ConfirmationBox/rows/AllowedSlippageRow.tsx #: src/components/Synthetics/PositionSeller/rows/AllowedSlippageRow.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/AllowedSlippageRow.tsx msgid "Slippage is too high" msgstr "" -#: src/components/Synthetics/ConfirmationBox/SideOrderEntries.tsx +#: src/components/Synthetics/TradeBox/components/SideOrderEntries.tsx msgid "Add Row" msgstr "" @@ -7543,12 +7508,12 @@ msgstr "" #: src/components/Exchange/OrdersList.js #: src/components/Exchange/OrdersList.js #: src/components/Exchange/SwapBox.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/OrderEditor/OrderEditor.tsx #: src/components/Synthetics/OrderItem/OrderItem.tsx #: src/components/Synthetics/OrderList/filters/OrderTypeFilter.tsx #: src/components/Synthetics/PositionItem/PositionItem.tsx #: src/components/Synthetics/TradeBox/TradeBox.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/LimitAndTPSLRows.tsx #: src/components/Synthetics/TradeHistory/keys.ts msgid "Limit" msgstr "限制" @@ -7571,7 +7536,6 @@ msgid "<0>Insufficient liquidity to execute the order<1>The mark price which msgstr "执行订单的流动性不足<1>作为交易所价格总和的标记价格未达到指定价格<2>已达到指定价格但时间不足以执行 <3>没有守门员领取执行令" #: src/components/Exchange/ConfirmationBox.js -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx msgid "Your position's collateral after deducting fees:" msgstr "扣除费用后,你的头寸的抵押品" @@ -7621,8 +7585,8 @@ msgstr "" msgid "01 Sep 2021" msgstr "01 Sep 2021" -#: src/components/Synthetics/ConfirmationBox/ConfirmationBox.tsx #: src/components/Synthetics/OrderList/filters/OrderTypeFilter.tsx +#: src/components/Synthetics/TradeBox/TradeBoxRows/LimitAndTPSLRows.tsx #: src/domain/synthetics/positions/utils.ts msgid "Take-Profit" msgstr "" diff --git a/src/pages/SyntheticsPage/SyntheticsPage.tsx b/src/pages/SyntheticsPage/SyntheticsPage.tsx index e278525aa7..cb24c4a131 100644 --- a/src/pages/SyntheticsPage/SyntheticsPage.tsx +++ b/src/pages/SyntheticsPage/SyntheticsPage.tsx @@ -5,7 +5,6 @@ import { startTransition, useCallback, useEffect, useMemo, useState } from "reac import Helmet from "react-helmet"; import type { MarketFilterLongShortItemData } from "components/Synthetics/TableMarketFilter/MarketFilterLongShort"; -import { DEFAULT_HIGHER_SLIPPAGE_AMOUNT } from "config/factors"; import { getSyntheticsListSectionKey } from "config/localStorage"; import { useSettings } from "context/SettingsContext/SettingsContextProvider"; import { useSubaccount, useSubaccountCancelOrdersDetailsMessage } from "context/SubaccountContext/SubaccountContext"; @@ -94,12 +93,6 @@ export function SyntheticsPage(p: Props) { const { savedAllowedSlippage, shouldShowPositionLines, setShouldShowPositionLines } = useSettings(); - const [isHigherSlippageAllowed, setIsHigherSlippageAllowed] = useState(false); - let allowedSlippage = savedAllowedSlippage!; - if (isHigherSlippageAllowed) { - allowedSlippage = DEFAULT_HIGHER_SLIPPAGE_AMOUNT; - } - const { isCancelOrdersProcessing, selectedOrderKeys, @@ -210,7 +203,7 @@ export function SyntheticsPage(p: Props) { setIsSettling={setIsSettling} isSettling={isSettling} setPendingTxns={setPendingTxns} - allowedSlippage={allowedSlippage} + allowedSlippage={savedAllowedSlippage} /> ); } @@ -306,12 +299,7 @@ export function SyntheticsPage(p: Props) {
    - +
    @@ -354,13 +342,9 @@ export function SyntheticsPage(p: Props) {
    - + - +