Skip to content

Commit d262a90

Browse files
authored
fix: remove c-factor rewards display (#1930)
1 parent 0f7569a commit d262a90

File tree

7 files changed

+2
-660
lines changed

7 files changed

+2
-660
lines changed

src/bonsai/ontology.ts

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import { AccountAuthenticator } from '@/constants/validators';
66
import {
77
IndexerFundingPaymentResponseObject,
88
IndexerHistoricalBlockTradingReward,
9-
IndexerHistoricalTradingRewardAggregation,
109
} from '@/types/indexer/indexerApiGen';
1110
import { IndexerWsTradesUpdateObject } from '@/types/indexer/indexerManual';
1211

@@ -24,12 +23,6 @@ import { Loadable, LoadableStatus } from './lib/loadable';
2423
import { useCurrentMarketHistoricalFunding } from './rest/funding';
2524
import { useFundingPayments } from './rest/fundingPayments';
2625
import { SubaccountPnlTick, useParentSubaccountHistoricalPnls } from './rest/historicalPnl';
27-
import {
28-
useDailyCumulativeTradingRewards,
29-
useHistoricalTradingRewards,
30-
useHistoricalTradingRewardsWeekly,
31-
useTotalTradingRewards,
32-
} from './rest/historicalTradingRewards';
3326
import { useAuthorizedAccounts } from './rest/permissionedKeys';
3427
import {
3528
StakingDelegationsResult,
@@ -112,7 +105,6 @@ import { DepthChartData, OrderbookProcessedData } from './types/orderbookTypes';
112105
import { MarketsData, ParentSubaccountDataBase } from './types/rawTypes';
113106
import {
114107
AccountBalances,
115-
AggregatedTradingReward,
116108
AllAssetData,
117109
ApiState,
118110
AssetData,
@@ -421,11 +413,7 @@ interface BonsaiHooksShape {
421413
useAuthorizedAccounts: () => Loadable<AccountAuthenticator[]>;
422414
useCurrentMarketHistoricalFunding: () => Loadable<HistoricalFundingObject[]>;
423415
useCurrentMarketLiveTrades: () => Loadable<IndexerWsTradesUpdateObject>;
424-
useDailyCumulativeTradingRewards: () => Loadable<AggregatedTradingReward[]>;
425-
useHistoricalTradingRewards: () => Loadable<IndexerHistoricalTradingRewardAggregation[]>;
426-
useHistoricalTradingRewardsWeekly: () => Loadable<BigNumber>;
427416
useParentSubaccountHistoricalPnls: () => Loadable<SubaccountPnlTick[]>;
428-
useTotalTradingRewards: () => Loadable<BigNumber>;
429417
useStakingRewards: () => Loadable<StakingRewards>;
430418
useUnbondingDelegations: () => Loadable<UnbondingDelegation[]>;
431419
useStakingDelegations: () => Loadable<StakingDelegationsResult>;
@@ -436,13 +424,9 @@ export const BonsaiHooks: BonsaiHooksShape = {
436424
useAuthorizedAccounts,
437425
useCurrentMarketHistoricalFunding,
438426
useCurrentMarketLiveTrades: useCurrentMarketTradesValue,
439-
useDailyCumulativeTradingRewards,
440-
useHistoricalTradingRewards,
441427
useFundingPayments,
442-
useHistoricalTradingRewardsWeekly,
443428
useParentSubaccountHistoricalPnls,
444429
useStakingRewards,
445-
useTotalTradingRewards,
446430
useUnbondingDelegations,
447431
useStakingDelegations,
448432
};

src/pages/Profile.tsx

Lines changed: 2 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import { BonsaiHooks } from '@/bonsai/ontology';
21
import { Link as ReactLink, useNavigate } from 'react-router-dom';
32
import styled, { css } from 'styled-components';
43
import tw from 'twin.macro';
@@ -15,17 +14,14 @@ import { useAccounts } from '@/hooks/useAccounts';
1514
import { useComplianceState } from '@/hooks/useComplianceState';
1615
import { useEnvConfig } from '@/hooks/useEnvConfig';
1716
import { useStringGetter } from '@/hooks/useStringGetter';
18-
import { useTokenConfigs } from '@/hooks/useTokenConfigs';
1917

2018
import breakpoints from '@/styles/breakpoints';
2119
import { layoutMixins } from '@/styles/layoutMixins';
2220

23-
import { AssetIcon } from '@/components/AssetIcon';
2421
import { Details } from '@/components/Details';
2522
import { Icon, IconName } from '@/components/Icon';
2623
import { IconButton, type IconButtonProps } from '@/components/IconButton';
2724
import { Link } from '@/components/Link';
28-
import { Output, OutputType } from '@/components/Output';
2925
import { Panel } from '@/components/Panel';
3026
import { Toolbar } from '@/components/Toolbar';
3127
import { FillsTable, FillsTableColumnKey } from '@/views/tables/FillsTable';
@@ -63,9 +59,7 @@ const Profile = () => {
6359
const isConnected = onboardingState !== OnboardingState.Disconnected;
6460

6561
const { sourceAccount, dydxAddress } = useAccounts();
66-
const { chainTokenImage, chainTokenLabel } = useTokenConfigs();
6762
const { disableConnectButton } = useComplianceState();
68-
const currentWeekTradingReward = BonsaiHooks.useHistoricalTradingRewardsWeekly().data;
6963

7064
const { data: ensName } = useEnsName({
7165
address:
@@ -187,30 +181,6 @@ const Profile = () => {
187181

188182
<StakingPanel tw="[grid-area:staking]" />
189183

190-
<$RewardsPanel
191-
slotHeaderContent={stringGetter({ key: STRING_KEYS.TRADING_REWARDS })}
192-
href={`/${chainTokenLabel}`}
193-
hasSeparator
194-
>
195-
<$Details
196-
items={[
197-
{
198-
key: 'week-rewards',
199-
label: stringGetter({ key: STRING_KEYS.THIS_WEEK }),
200-
value: (
201-
<Output
202-
slotRight={
203-
<AssetIcon logoUrl={chainTokenImage} symbol={chainTokenLabel} tw="ml-[0.5ch]" />
204-
}
205-
type={OutputType.Asset}
206-
value={currentWeekTradingReward}
207-
/>
208-
),
209-
},
210-
]}
211-
layout="grid"
212-
/>
213-
</$RewardsPanel>
214184
<Panel
215185
slotHeaderContent={stringGetter({ key: STRING_KEYS.FEES })}
216186
href={`${AppRoute.Portfolio}/${PortfolioRoute.Fees}`}
@@ -278,7 +248,7 @@ const $MobileProfileLayout = styled.div`
278248
'actions actions'
279249
'settings help'
280250
'staking staking'
281-
'rewards fees'
251+
'fees fees'
282252
'history history'
283253
'governance governance'
284254
'incentives incentives'
@@ -290,7 +260,7 @@ const $MobileProfileLayout = styled.div`
290260
'actions actions'
291261
'settings help'
292262
'staking staking'
293-
'rewards fees'
263+
'fees fees'
294264
'history history'
295265
'governance governance'
296266
'incentives incentives'
@@ -373,18 +343,6 @@ const $ActionButton = styled(IconButton)<{ iconName?: IconName }>`
373343

374344
const $Details = tw(Details)`font-small-book [--details-value-font:--font-medium-book]`;
375345

376-
const $RewardsPanel = styled(Panel)`
377-
grid-area: rewards;
378-
align-self: flex-start;
379-
height: 100%;
380-
> div {
381-
height: 100%;
382-
}
383-
384-
dl {
385-
--details-grid-numColumns: 1;
386-
}
387-
`;
388346
const $HistoryPanel = styled(Panel)`
389347
grid-area: history;
390348
--panel-content-paddingY: 0;

src/pages/token/RewardHistoryPanel.tsx

Lines changed: 0 additions & 52 deletions
This file was deleted.

src/pages/token/RewardsPage.tsx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ import { orEmptyObj } from '@/lib/typeUtils';
2525

2626
import { GeoblockedPanel } from './GeoblockedPanel';
2727
import { LaunchIncentivesPanel } from './LaunchIncentivesPanel';
28-
import { RewardHistoryPanel } from './RewardHistoryPanel';
2928
import { RewardsHelpPanel } from './RewardsHelpPanel';
3029
import { RewardsLeaderboardPanel } from './RewardsLeaderboardPanel';
3130
import { StakingPanel } from './StakingPanel';
@@ -77,7 +76,6 @@ const RewardsPage = () => {
7776
<StakingPanel />
7877
<UnbondingPanels />
7978
<LaunchIncentivesPanel />
80-
<RewardHistoryPanel />
8179
<RewardsHelpPanel />
8280
{legalDisclaimer}
8381
</$DetachedSection>
@@ -88,7 +86,6 @@ const RewardsPage = () => {
8886
<div tw="flexColumn flex-[2] gap-1.5">
8987
<LaunchIncentivesPanel />
9088
<RewardsLeaderboardPanel />
91-
<RewardHistoryPanel />
9289
</div>
9390
<div tw="flexColumn flex-1 gap-1.5">
9491
{showGeoblockedPanel && <GeoblockedPanel />}

src/pages/token/TradingRewardsChartPanel.tsx

Lines changed: 0 additions & 69 deletions
This file was deleted.

0 commit comments

Comments
 (0)