From 28662e4e0841bb05f9da22af93ebbe8c06e4392b Mon Sep 17 00:00:00 2001 From: Kellar Date: Wed, 11 Dec 2024 16:12:03 +0000 Subject: [PATCH] remove some more refs to underlying token data --- src/providers/App/governance/action.ts | 6 ------ src/providers/App/governance/reducer.ts | 4 ---- src/types/account.ts | 5 ----- 3 files changed, 15 deletions(-) diff --git a/src/providers/App/governance/action.ts b/src/providers/App/governance/action.ts index db3dd64f21..42c7045b9d 100644 --- a/src/providers/App/governance/action.ts +++ b/src/providers/App/governance/action.ts @@ -6,7 +6,6 @@ import { FractalProposalState, VotesData, VotingStrategy, - UnderlyingTokenData, GovernanceType, ERC721TokenData, } from '../../../types'; @@ -30,7 +29,6 @@ export enum FractalGovernanceAction { SET_TOKEN_ACCOUNT_DATA = 'SET_TOKEN_ACCOUNT_DATA', SET_CLAIMING_CONTRACT = 'SET_CLAIMING_CONTRACT', RESET_TOKEN_ACCOUNT_DATA = 'RESET_TOKEN_ACCOUNT_DATA', - SET_UNDERLYING_TOKEN_DATA = 'SET_UNDERLYING_TOKEN_DATA', PENDING_PROPOSAL_ADD = 'PENDING_PROPOSAL_ADD', } @@ -88,10 +86,6 @@ export type FractalGovernanceActions = type: FractalGovernanceAction.SET_TOKEN_DATA; payload: ERC20TokenData; } - | { - type: FractalGovernanceAction.SET_UNDERLYING_TOKEN_DATA; - payload: UnderlyingTokenData; - } | { type: FractalGovernanceAction.SET_TOKEN_ACCOUNT_DATA; payload: VotesData; diff --git a/src/providers/App/governance/reducer.ts b/src/providers/App/governance/reducer.ts index 83369377f0..3e29e341b7 100644 --- a/src/providers/App/governance/reducer.ts +++ b/src/providers/App/governance/reducer.ts @@ -185,10 +185,6 @@ export const governanceReducer = (state: FractalGovernance, action: FractalGover case FractalGovernanceAction.SET_ERC721_TOKENS_DATA: { return { ...state, erc721Tokens: action.payload }; } - case FractalGovernanceAction.SET_UNDERLYING_TOKEN_DATA: { - const { votesToken } = state as AzoriusGovernance; - return { ...state, votesToken: { ...votesToken, underlyingTokenData: action.payload } }; - } case FractalGovernanceAction.SET_TOKEN_ACCOUNT_DATA: { const { votesToken } = state as AzoriusGovernance; return { ...state, votesToken: { ...votesToken, ...action.payload } }; diff --git a/src/types/account.ts b/src/types/account.ts index 6f0281c863..c1585af171 100644 --- a/src/types/account.ts +++ b/src/types/account.ts @@ -6,10 +6,6 @@ export interface VotesData { delegatee: Address | null; votingWeight: bigint | null; } -export type UnderlyingTokenData = Omit< - ERC20TokenData, - 'totalSupply' | 'decimals' | 'underlyingTokenData' ->; export interface BaseTokenData { name: string; @@ -19,7 +15,6 @@ export interface BaseTokenData { export interface ERC20TokenData extends BaseTokenData { decimals: number; totalSupply: bigint; - underlyingTokenData?: UnderlyingTokenData; } export interface ERC721TokenData extends BaseTokenData {