diff --git a/scripts/inject-amplitude.js b/scripts/inject-amplitude.js index 084ddbc166..44a0cdc8bf 100644 --- a/scripts/inject-amplitude.js +++ b/scripts/inject-amplitude.js @@ -35,9 +35,14 @@ async function inject(fileName) { if (!e) return; // Enrichment plugin to add 'frontend' to ALL events (including automatic ones) - var appendBonkPlugin = { - name: 'append-bonk-plugin', - execute: async function(event) { + class AppendBonkPlugin { + name = 'append-bonk-plugin'; + + async setup(config) { + return undefined; + } + + async execute(event) { event.event_properties = { ...event.event_properties, frontend: 'bonk', @@ -47,7 +52,7 @@ async function inject(fileName) { }; // add plugin BEFORE init - globalThis.amplitude.add(appendBonkPlugin()); + globalThis.amplitude.add(new AppendBonkPlugin()); // now initialize amplitude globalThis.amplitude.init(e${ diff --git a/src/pages/token/RewardsPage.tsx b/src/pages/token/RewardsPage.tsx index df05b99194..d58bef8e29 100644 --- a/src/pages/token/RewardsPage.tsx +++ b/src/pages/token/RewardsPage.tsx @@ -32,13 +32,13 @@ import { orEmptyObj } from '@/lib/typeUtils'; import { BonkPnlLeaderboardPanel } from './BonkPnlLeaderboardPanel'; import { CompetitionLeaderboardPanel } from './CompetitionLeaderboardPanel'; -import { RwaCompetitionPanel } from './RwaCompetitionPanel'; import { GeoblockedPanel } from './GeoblockedPanel'; import { LaunchIncentivesPanel } from './LaunchIncentivesPanel'; import { LiquidationRebatesHeader } from './LiquidationRebatesHeader'; import { LiquidationRebatesPanel } from './LiquidationRebatesPanel'; import { RebatesIncetivesPanel } from './RebatesIncetivesPanel'; import { RewardsHelpPanel } from './RewardsHelpPanel'; +import { RwaCompetitionPanel } from './RwaCompetitionPanel'; import { StakingRewardPanel } from './StakingRewardPanel'; import { SwapAndStakingPanel } from './SwapAndStakingPanel'; import { UnbondingPanels } from './UnbondingPanels'; diff --git a/src/pages/token/RwaCompetitionPanel.tsx b/src/pages/token/RwaCompetitionPanel.tsx index 6c78cdd6c0..2d5661ebb2 100644 --- a/src/pages/token/RwaCompetitionPanel.tsx +++ b/src/pages/token/RwaCompetitionPanel.tsx @@ -25,21 +25,21 @@ import { LoadingSpace } from '@/components/Loading/LoadingSpinner'; import { Output, OutputType } from '@/components/Output'; import { Panel } from '@/components/Panel'; import { ColumnDef, Table } from '@/components/Table'; -import { SuccessTag, PrivateTag, TagSize } from '@/components/Tag'; +import { PrivateTag, SuccessTag, TagSize } from '@/components/Tag'; import { truncateAddress } from '@/lib/wallet'; -const PRIZE_TIERS = [ - { place: '1st', amount: '$3,000' }, - { place: '2nd', amount: '$2,000' }, - { place: '3rd', amount: '$1,000' }, - { place: '4th-5th', amount: '$750' }, - { place: '6th-10th', amount: '$500' }, -]; +// const PRIZE_TIERS = [ +// { place: '1st', amount: '$3,000' }, +// { place: '2nd', amount: '$2,000' }, +// { place: '3rd', amount: '$1,000' }, +// { place: '4th-5th', amount: '$750' }, +// { place: '6th-10th', amount: '$500' }, +// ]; export const RwaCompetitionPanel = () => { const activeWeek = getActiveRwaWeek(); - const { market, week } = useRwaMarketPnl(); + const { market } = useRwaMarketPnl(); const displayWeek = activeWeek ?? RWA_COMPETITION_WEEKS[RWA_COMPETITION_WEEKS.length - 1]!; const competitionStart = new Date(RWA_COMPETITION_DETAILS.startTime); @@ -68,8 +68,8 @@ export const RwaCompetitionPanel = () => { - Compete for a {RWA_COMPETITION_DETAILS.rewardAmount} prize pool in every RWA - trading sprint, awarded to the Top 10 traders. + Compete for a {RWA_COMPETITION_DETAILS.rewardAmount} prize pool in every RWA trading + sprint, awarded to the Top 10 traders.
@@ -82,13 +82,12 @@ export const RwaCompetitionPanel = () => {
- 2 days after each RWA trading sprint, users can claim rewards and check - eligibility{' '} + 2 days after each RWA trading sprint, users can claim rewards and check eligibility{' '} here - . Rewards are distributed within 30 days of a valid claim and must be claimed - within 30 days after the trading competition ends. + . Rewards are distributed within 30 days of a valid claim and must be claimed within + 30 days after the trading competition ends. @@ -122,7 +121,10 @@ const RwaLeaderboardTable = () => { const userRow = pnlItems?.find((item) => item.address === dydxAddress); const data = [ - ...new Set([...(userRow ? [userRow] : []), ...(pnlItems?.filter((item) => item.pnl !== 0) ?? [])]), + ...new Set([ + ...(userRow ? [userRow] : []), + ...(pnlItems?.filter((item) => item.pnl !== 0) ?? []), + ]), ]; return ( @@ -267,9 +269,7 @@ const getRwaTableColumnDef = ({ [RwaTableColumns.Prize]: { columnKey: RwaTableColumns.Prize, getCellValue: (row) => row.position, - label: ( -
Prize
- ), + label:
Prize
, renderCell: ({ position }) => (