fix(trading): update copy on tooltips fills update (#5512)
This commit is contained in:
parent
362a2031c7
commit
10add7c236
@ -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")
|
expect(page.locator(COL_ID_FEE)).to_have_text("0.00 tDAI")
|
||||||
page.locator(COL_ID_FEE).hover()
|
page.locator(COL_ID_FEE).hover()
|
||||||
expect(page.get_by_test_id("fee-breakdown-tooltip")).to_have_text(
|
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")
|
change_keys(page, vega, "market_maker")
|
||||||
expect(page.locator(COL_ID_FEE)).to_have_text("0.00 tDAI")
|
expect(page.locator(COL_ID_FEE)).to_have_text("0.00 tDAI")
|
||||||
page.locator(COL_ID_FEE).hover()
|
page.locator(COL_ID_FEE).hover()
|
||||||
expect(page.get_by_test_id("fee-breakdown-tooltip")).to_have_text(
|
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"
|
||||||
)
|
)
|
||||||
|
@ -87,9 +87,9 @@ export const FillsTable = forwardRef<AgGridReact, Props>(
|
|||||||
colId: 'fee',
|
colId: 'fee',
|
||||||
field: 'market',
|
field: 'market',
|
||||||
valueFormatter: formatFee(partyId),
|
valueFormatter: formatFee(partyId),
|
||||||
|
tooltipComponent: FeesBreakdownTooltip,
|
||||||
type: 'rightAligned',
|
type: 'rightAligned',
|
||||||
tooltipField: 'market',
|
tooltipField: 'market',
|
||||||
tooltipComponent: FeesBreakdownTooltip,
|
|
||||||
tooltipComponentParams: { partyId },
|
tooltipComponentParams: { partyId },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -97,13 +97,13 @@ export const FillsTable = forwardRef<AgGridReact, Props>(
|
|||||||
colId: 'fee-discount',
|
colId: 'fee-discount',
|
||||||
field: 'market',
|
field: 'market',
|
||||||
valueFormatter: formatFeeDiscount(partyId),
|
valueFormatter: formatFeeDiscount(partyId),
|
||||||
type: 'rightAligned',
|
|
||||||
// return null to disable tooltip if fee discount is 0 or empty
|
|
||||||
tooltipValueGetter: ({ valueFormatted, value }) => {
|
tooltipValueGetter: ({ valueFormatted, value }) => {
|
||||||
return valueFormatted && /[1-9]/.test(valueFormatted)
|
return valueFormatted && /[1-9]/.test(valueFormatted)
|
||||||
? valueFormatted
|
? valueFormatted
|
||||||
: null;
|
: null;
|
||||||
},
|
},
|
||||||
|
type: 'rightAligned',
|
||||||
|
// return null to disable tooltip if fee discount is 0 or empty
|
||||||
cellRenderer: ({
|
cellRenderer: ({
|
||||||
value,
|
value,
|
||||||
valueFormatted,
|
valueFormatted,
|
||||||
@ -146,7 +146,7 @@ export const FillsTable = forwardRef<AgGridReact, Props>(
|
|||||||
overlayNoRowsTemplate={t('No fills')}
|
overlayNoRowsTemplate={t('No fills')}
|
||||||
getRowId={({ data }) => data?.id}
|
getRowId={({ data }) => data?.id}
|
||||||
tooltipShowDelay={0}
|
tooltipShowDelay={0}
|
||||||
tooltipHideDelay={2000}
|
tooltipHideDelay={10000}
|
||||||
components={{ MarketNameCell }}
|
components={{ MarketNameCell }}
|
||||||
{...props}
|
{...props}
|
||||||
/>
|
/>
|
||||||
@ -292,21 +292,27 @@ const FeesBreakdownTooltip = ({
|
|||||||
)}
|
)}
|
||||||
{role === MAKER && (
|
{role === MAKER && (
|
||||||
<>
|
<>
|
||||||
<p className="mb-1">{t('The maker will receive the maker fee.')}</p>
|
|
||||||
<p className="mb-1">
|
<p className="mb-1">
|
||||||
{t(
|
{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.`
|
||||||
|
)}
|
||||||
|
</p>
|
||||||
|
<p className="mb-1">
|
||||||
|
{t(
|
||||||
|
'During continuous trading the maker pays no infrastructure and liquidity fees.'
|
||||||
)}
|
)}
|
||||||
</p>
|
</p>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
{role === TAKER && (
|
{role === TAKER && (
|
||||||
<p className="mb-1">{t('Fees to be paid by the taker.')}</p>
|
<p className="mb-1">
|
||||||
|
{t('Fees to be paid by the taker; discounts are already applied.')}
|
||||||
|
</p>
|
||||||
)}
|
)}
|
||||||
{(role === '-' || marketState === Schema.MarketState.STATE_SUSPENDED) && (
|
{(role === '-' || marketState === Schema.MarketState.STATE_SUSPENDED) && (
|
||||||
<p className="mb-1">
|
<p className="mb-1">
|
||||||
{t(
|
{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.'
|
||||||
)}
|
)}
|
||||||
</p>
|
</p>
|
||||||
)}
|
)}
|
||||||
|
@ -5,9 +5,9 @@
|
|||||||
"Date": "Date",
|
"Date": "Date",
|
||||||
"Fee": "Fee",
|
"Fee": "Fee",
|
||||||
"Fee Discount": "Fee Discount",
|
"Fee Discount": "Fee Discount",
|
||||||
"Fees to be paid by the taker.": "Fees to be paid by the taker.",
|
"Fees to be paid by the taker; discounts are already applied.": "Fees to be paid by the taker; discounts are already applied.",
|
||||||
"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.",
|
"During continuous trading the maker pays no infrastructure and liquidity fees.": "During continuous trading the maker pays no 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.",
|
"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",
|
"Infrastructure Fee": "Infrastructure Fee",
|
||||||
"Market": "Market",
|
"Market": "Market",
|
||||||
"No fills": "No fills",
|
"No fills": "No fills",
|
||||||
|
Loading…
Reference in New Issue
Block a user