Skip to content

Commit

Permalink
chore(staking): remove last faq question (dydxprotocol#712)
Browse files Browse the repository at this point in the history
  • Loading branch information
moo-onthelawn authored and DavideSegullo committed Jun 26, 2024
1 parent 66c804d commit 344f02a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 42 deletions.
9 changes: 3 additions & 6 deletions public/configs/v1/env.json
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +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/",
"validatorSelectionDocument": ""
"protocolStaking": "https://protocolstaking.info/"
},
"dydx-testnet-4": {
"tos": "https://dydx.exchange/v4-terms",
Expand Down Expand Up @@ -119,8 +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/",
"validatorSelectionDocument": ""
"protocolStaking": "https://protocolstaking.info/"
},
"[mainnet chain id]": {
"tos": "[HTTP link to TOS]",
Expand Down Expand Up @@ -154,8 +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]",
"validatorSelectionDocument": "[HTTP link to document explaining preconfigured validator selection]"
"protocolStaking": "[HTTP link to protocol staking info]"
}
},
"wallets": {
Expand Down
2 changes: 0 additions & 2 deletions src/hooks/useURLConfigs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ export interface LinksConfigs {
contractLossMechanismLearnMore?: string;
mintscanValidatorsLearnMore?: string;
protocolStaking: string;
validatorSelectionDocument?: string;
}

export const useURLConfigs = (): LinksConfigs => {
Expand Down Expand Up @@ -78,6 +77,5 @@ export const useURLConfigs = (): LinksConfigs => {
contractLossMechanismLearnMore: linksConfigs.contractLossMechanismLearnMore,
mintscanValidatorsLearnMore: linksConfigs.mintscanValidatorsLearnMore,
protocolStaking: linksConfigs.protocolStaking,
validatorSelectionDocument: linksConfigs.validatorSelectionDocument ?? FALLBACK_URL,
};
};
35 changes: 1 addition & 34 deletions src/pages/token/rewards/RewardsHelpPanel.tsx
Original file line number Diff line number Diff line change
@@ -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';
Expand All @@ -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
Expand Down Expand Up @@ -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 })}
</$AccentLink>
),
DOCUMENT_LINK: (
<$AccentLink href={validatorSelectionDocument}>
{stringGetter({ key: STRING_KEYS.DOCUMENT })}
</$AccentLink>
),
},
}),
},
]
: []),
]}
Expand Down

0 comments on commit 344f02a

Please sign in to comment.