diff --git a/apps/trading/client-pages/rewards/index.ts b/apps/trading/client-pages/rewards/index.ts new file mode 100644 index 000000000..b41d3a1d5 --- /dev/null +++ b/apps/trading/client-pages/rewards/index.ts @@ -0,0 +1 @@ +export { Rewards } from './rewards'; diff --git a/apps/trading/client-pages/rewards/rewards.tsx b/apps/trading/client-pages/rewards/rewards.tsx new file mode 100644 index 000000000..ffcc5ac00 --- /dev/null +++ b/apps/trading/client-pages/rewards/rewards.tsx @@ -0,0 +1,11 @@ +import { t } from '@vegaprotocol/i18n'; +import { RewardsContainer } from '../../components/rewards-container'; + +export const Rewards = () => { + return ( +
+ {description ?
+
{t('No volume discount program active')}
)} -+
{t('No referral program active')}
)} -{minAdjustedTotal !== undefined && maxAdjustedTotal !== undefined ? `${formatPercentage(minAdjustedTotal)}%-${formatPercentage( @@ -253,47 +252,43 @@ export const TradingFees = ({ )}%` : `${formatPercentage(adjustedTotal)}%`}
-- {t('Total fee before discount')} - | -- {minTotal !== undefined && maxTotal !== undefined - ? `${formatPercentage( - minTotal.toNumber() - )}%-${formatPercentage(maxTotal.toNumber())}%` - : `${formatPercentage(total.toNumber())}%`} - | +
---|---|
{t('Infrastructure')} | -- {formatPercentage( - Number(params.market_fee_factors_infrastructureFee) - )} - % - | -
{t('Maker')} | -- {formatPercentage(Number(params.market_fee_factors_makerFee))}% - | -
{t('Liquidity')} | -- {formatPercentage(Number(minLiq.fees.factors.liquidityFee))}% - {'-'} - {formatPercentage(Number(maxLiq.fees.factors.liquidityFee))}% - | -
{t('Volume discount')} | -
- {formatPercentage(volumeDiscount)}%
- {!isVolumeDiscountProgramRunning && (
- |
-
---|---|
{t('Referral discount')} | -
- {formatPercentage(referralDiscount)}%
- {!isReferralProgramRunning && (
- |
-
+
{t('No volume discount program active')}
); @@ -501,7 +494,7 @@ const ReferralTiers = ({ }) => { if (!tiers.length) { return ( -{t('No referral program active')}
+{t('No referral program active')}
); } @@ -557,20 +550,20 @@ const ReferralTiers = ({ const YourTier = () => { return ( - + {t('Your tier')} ); }; const ReferrerInfo = ({ code }: { code?: string }) => ( -
{t('Connected key is owner of the referral set')}
{code && (
<>
{' '}
-
+
{truncateMiddle(code)}
>
@@ -581,7 +574,7 @@ const ReferrerInfo = ({ code }: { code?: string }) => (
{t('See')}{' '}
{t('Referrals')}
diff --git a/apps/trading/components/fees-container/stat.tsx b/apps/trading/components/fees-container/stat.tsx
deleted file mode 100644
index 307b77ff0..000000000
--- a/apps/trading/components/fees-container/stat.tsx
+++ /dev/null
@@ -1,34 +0,0 @@
-import { Tooltip } from '@vegaprotocol/ui-toolkit';
-import classNames from 'classnames';
-import type { ReactNode } from 'react';
-
-export const Stat = ({
- value,
- text,
- highlight,
- description,
-}: {
- value: string | number;
- text?: string;
- highlight?: boolean;
- description?: ReactNode;
-}) => {
- const val = (
-
- {value}
-
- );
- return (
-
- {description ?