From b7fad72ea45ad1583c5cc9c73d60e524c57d1741 Mon Sep 17 00:00:00 2001 From: mulan xia Date: Fri, 21 Jun 2024 16:41:51 -0400 Subject: [PATCH 1/2] ok --- public/configs/v1/env.json | 3 -- src/hooks/useURLConfigs.ts | 2 -- src/pages/token/rewards/RewardsHelpPanel.tsx | 35 +------------------- 3 files changed, 1 insertion(+), 39 deletions(-) diff --git a/public/configs/v1/env.json b/public/configs/v1/env.json index d525d826f..415f655d3 100644 --- a/public/configs/v1/env.json +++ b/public/configs/v1/env.json @@ -85,7 +85,6 @@ "isolatedMarginLearnMore": "https://help.dydx.trade/en/articles/172975-isolated-margin", "mintscanValidatorsLearnMore": "https://www.mintscan.io/dydx/validators", "protocolStaking": "https://protocolstaking.info/", - "validatorSelectionDocument": "" }, "dydx-testnet-4": { "tos": "https://dydx.exchange/v4-terms", @@ -120,7 +119,6 @@ "isolatedMarginLearnMore": "https://help.dydx.trade/en/articles/172975-isolated-margin", "mintscanValidatorsLearnMore": "https://www.mintscan.io/dydx/validators", "protocolStaking": "https://protocolstaking.info/", - "validatorSelectionDocument": "" }, "[mainnet chain id]": { "tos": "[HTTP link to TOS]", @@ -155,7 +153,6 @@ "isolatedMarginLearnMore": "[HTTP link to documentation on isolated margin]", "mintscanValidatorsLearnMore": "[HTTP link to mintscan info on validators]", "protocolStaking": "[HTTP link to protocol staking info]", - "validatorSelectionDocument": "[HTTP link to document explaining preconfigured validator selection]" } }, "wallets": { diff --git a/src/hooks/useURLConfigs.ts b/src/hooks/useURLConfigs.ts index 5665fecab..23437a22a 100644 --- a/src/hooks/useURLConfigs.ts +++ b/src/hooks/useURLConfigs.ts @@ -38,7 +38,6 @@ export interface LinksConfigs { contractLossMechanismLearnMore?: string; mintscanValidatorsLearnMore?: string; protocolStaking: string; - validatorSelectionDocument?: string; } export const useURLConfigs = (): LinksConfigs => { @@ -78,6 +77,5 @@ export const useURLConfigs = (): LinksConfigs => { contractLossMechanismLearnMore: linksConfigs.contractLossMechanismLearnMore, mintscanValidatorsLearnMore: linksConfigs.mintscanValidatorsLearnMore, protocolStaking: linksConfigs.protocolStaking, - validatorSelectionDocument: linksConfigs.validatorSelectionDocument ?? FALLBACK_URL, }; }; diff --git a/src/pages/token/rewards/RewardsHelpPanel.tsx b/src/pages/token/rewards/RewardsHelpPanel.tsx index a47c6cb9f..eaca34bc6 100644 --- a/src/pages/token/rewards/RewardsHelpPanel.tsx +++ b/src/pages/token/rewards/RewardsHelpPanel.tsx @@ -1,6 +1,5 @@ import styled from 'styled-components'; -import { DialogTypes } from '@/constants/dialogs'; import { STRING_KEYS } from '@/constants/localization'; import { useEnvFeatures } from '@/hooks/useEnvFeatures'; @@ -14,23 +13,11 @@ import { Accordion } from '@/components/Accordion'; import { Link } from '@/components/Link'; import { Panel } from '@/components/Panel'; -import { useAppDispatch } from '@/state/appTypes'; -import { openDialog } from '@/state/dialogs'; - export const RewardsHelpPanel = () => { - const dispatch = useAppDispatch(); const stringGetter = useStringGetter(); const { isStakingEnabled } = useEnvFeatures(); - const { tradingRewardsLearnMore, mintscanValidatorsLearnMore, validatorSelectionDocument } = - useURLConfigs(); - - const openKeplrDialog = () => - dispatch( - openDialog({ - type: DialogTypes.ExternalNavKeplr, - }) - ); + const { tradingRewardsLearnMore, mintscanValidatorsLearnMore } = useURLConfigs(); return ( <$HelpCard @@ -110,26 +97,6 @@ export const RewardsHelpPanel = () => { }, }), }, - { - header: stringGetter({ - key: STRING_KEYS.FAQ_WHICH_VALIDATORS_ARE_AVAILABLE_QUESTION, - }), - content: stringGetter({ - key: STRING_KEYS.FAQ_WHICH_VALIDATORS_ARE_AVAILABLE_ANSWER, - params: { - KEPLR_LINK: ( - <$AccentLink onClick={openKeplrDialog}> - {stringGetter({ key: STRING_KEYS.KEPLR })} - - ), - DOCUMENT_LINK: ( - <$AccentLink href={validatorSelectionDocument}> - {stringGetter({ key: STRING_KEYS.DOCUMENT })} - - ), - }, - }), - }, ] : []), ]} From 6162bae3779948c1b93bfa3b6794e304c2f949dc Mon Sep 17 00:00:00 2001 From: mulan xia Date: Fri, 21 Jun 2024 16:48:33 -0400 Subject: [PATCH 2/2] commas --- public/configs/v1/env.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/public/configs/v1/env.json b/public/configs/v1/env.json index 415f655d3..4522fb62b 100644 --- a/public/configs/v1/env.json +++ b/public/configs/v1/env.json @@ -84,7 +84,7 @@ "contractLossMechanismLearnMore": "https://help.dydx.trade/en/articles/166973-contract-loss-mechanisms-on-dydx-chain", "isolatedMarginLearnMore": "https://help.dydx.trade/en/articles/172975-isolated-margin", "mintscanValidatorsLearnMore": "https://www.mintscan.io/dydx/validators", - "protocolStaking": "https://protocolstaking.info/", + "protocolStaking": "https://protocolstaking.info/" }, "dydx-testnet-4": { "tos": "https://dydx.exchange/v4-terms", @@ -118,7 +118,7 @@ "contractLossMechanismLearnMore": "https://help.dydx.trade/en/articles/166973-contract-loss-mechanisms-on-dydx-chain", "isolatedMarginLearnMore": "https://help.dydx.trade/en/articles/172975-isolated-margin", "mintscanValidatorsLearnMore": "https://www.mintscan.io/dydx/validators", - "protocolStaking": "https://protocolstaking.info/", + "protocolStaking": "https://protocolstaking.info/" }, "[mainnet chain id]": { "tos": "[HTTP link to TOS]", @@ -152,7 +152,7 @@ "contractLossMechanismLearnMore": "[HTTP link to documentation on contract loss mechanisms]", "isolatedMarginLearnMore": "[HTTP link to documentation on isolated margin]", "mintscanValidatorsLearnMore": "[HTTP link to mintscan info on validators]", - "protocolStaking": "[HTTP link to protocol staking info]", + "protocolStaking": "[HTTP link to protocol staking info]" } }, "wallets": {