Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(staking): remove last faq question #712

Merged
merged 2 commits into from
Jun 21, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions public/configs/v1/env.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": ""
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the trailing commas need to be removed as well

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oops ty my bad

},
"dydx-testnet-4": {
"tos": "https://dydx.exchange/v4-terms",
Expand Down Expand Up @@ -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]",
Expand Down Expand Up @@ -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": {
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
Loading