From 10add7c236ca9f8893db24dc61e59f16b9ba6984 Mon Sep 17 00:00:00 2001 From: "m.ray" <16125548+MadalinaRaicu@users.noreply.github.com> Date: Wed, 20 Dec 2023 10:12:35 +0200 Subject: [PATCH] fix(trading): update copy on tooltips fills update (#5512) --- apps/trading/e2e/tests/market/test_market.py | 4 ++-- libs/fills/src/lib/fills-table.tsx | 22 +++++++++++++------- libs/i18n/src/locales/en/fills.json | 6 +++--- 3 files changed, 19 insertions(+), 13 deletions(-) diff --git a/apps/trading/e2e/tests/market/test_market.py b/apps/trading/e2e/tests/market/test_market.py index a2174e7a8..291e42aab 100644 --- a/apps/trading/e2e/tests/market/test_market.py +++ b/apps/trading/e2e/tests/market/test_market.py @@ -208,11 +208,11 @@ def test_auction_uncross_fees(continuous_market, vega: VegaService, page: Page): expect(page.locator(COL_ID_FEE)).to_have_text("0.00 tDAI") page.locator(COL_ID_FEE).hover() expect(page.get_by_test_id("fee-breakdown-tooltip")).to_have_text( - "If the market was suspendedIf the market is in monitoring auction, half of the infrastructure and liquidity fees will be paid.Infrastructure fee0.00 tDAILiquidity fee0.00 tDAIMaker fee0.00 tDAITotal fees0.00 tDAI" + "If the market was suspendedDuring auction, half the infrastructure and liquidity fees will be paid.Infrastructure fee0.00 tDAILiquidity fee0.00 tDAIMaker fee0.00 tDAITotal fees0.00 tDAI" ) change_keys(page, vega, "market_maker") expect(page.locator(COL_ID_FEE)).to_have_text("0.00 tDAI") page.locator(COL_ID_FEE).hover() expect(page.get_by_test_id("fee-breakdown-tooltip")).to_have_text( - "If the market was suspendedIf the market is in monitoring auction, half of the infrastructure and liquidity fees will be paid.Infrastructure fee0.00 tDAILiquidity fee0.00 tDAIMaker fee0.00 tDAITotal fees0.00 tDAI" + "If the market was suspendedDuring auction, half the infrastructure and liquidity fees will be paid.Infrastructure fee0.00 tDAILiquidity fee0.00 tDAIMaker fee0.00 tDAITotal fees0.00 tDAI" ) diff --git a/libs/fills/src/lib/fills-table.tsx b/libs/fills/src/lib/fills-table.tsx index ab61323a8..c8224c861 100644 --- a/libs/fills/src/lib/fills-table.tsx +++ b/libs/fills/src/lib/fills-table.tsx @@ -87,9 +87,9 @@ export const FillsTable = forwardRef( colId: 'fee', field: 'market', valueFormatter: formatFee(partyId), + tooltipComponent: FeesBreakdownTooltip, type: 'rightAligned', tooltipField: 'market', - tooltipComponent: FeesBreakdownTooltip, tooltipComponentParams: { partyId }, }, { @@ -97,13 +97,13 @@ export const FillsTable = forwardRef( colId: 'fee-discount', field: 'market', valueFormatter: formatFeeDiscount(partyId), - type: 'rightAligned', - // return null to disable tooltip if fee discount is 0 or empty tooltipValueGetter: ({ valueFormatted, value }) => { return valueFormatted && /[1-9]/.test(valueFormatted) ? valueFormatted : null; }, + type: 'rightAligned', + // return null to disable tooltip if fee discount is 0 or empty cellRenderer: ({ value, valueFormatted, @@ -146,7 +146,7 @@ export const FillsTable = forwardRef( overlayNoRowsTemplate={t('No fills')} getRowId={({ data }) => data?.id} tooltipShowDelay={0} - tooltipHideDelay={2000} + tooltipHideDelay={10000} components={{ MarketNameCell }} {...props} /> @@ -292,21 +292,27 @@ const FeesBreakdownTooltip = ({ )} {role === MAKER && ( <> -

{t('The maker will receive the maker fee.')}

{t( - 'If the market is active the maker will pay zero infrastructure and liquidity fees.' + `Fee revenue to be received by the maker, takers' fee discounts already applied.` + )} +

+

+ {t( + 'During continuous trading the maker pays no infrastructure and liquidity fees.' )}

)} {role === TAKER && ( -

{t('Fees to be paid by the taker.')}

+

+ {t('Fees to be paid by the taker; discounts are already applied.')} +

)} {(role === '-' || marketState === Schema.MarketState.STATE_SUSPENDED) && (

{t( - 'If the market is in monitoring auction, half of the infrastructure and liquidity fees will be paid.' + 'During auction, half the infrastructure and liquidity fees will be paid.' )}

)} diff --git a/libs/i18n/src/locales/en/fills.json b/libs/i18n/src/locales/en/fills.json index a2290097a..58fc57900 100644 --- a/libs/i18n/src/locales/en/fills.json +++ b/libs/i18n/src/locales/en/fills.json @@ -5,9 +5,9 @@ "Date": "Date", "Fee": "Fee", "Fee Discount": "Fee Discount", - "Fees to be paid by the taker.": "Fees to be paid by the taker.", - "If the market is active the maker will pay zero infrastructure and liquidity fees.": "If the market is active the maker will pay zero infrastructure and liquidity fees.", - "If the market is in monitoring auction, half of the infrastructure and liquidity fees will be paid.": "If the market is in monitoring auction, half of the infrastructure and liquidity fees will be paid.", + "Fees to be paid by the taker; discounts are already applied.": "Fees to be paid by the taker; discounts are already applied.", + "During continuous trading the maker pays no infrastructure and liquidity fees.": "During continuous trading the maker pays no infrastructure and liquidity fees.", + "During auction, half the infrastructure and liquidity fees will be paid.": "During auction, half the infrastructure and liquidity fees will be paid.", "Infrastructure Fee": "Infrastructure Fee", "Market": "Market", "No fills": "No fills",