diff --git a/package.json b/package.json index 9e3446d..79ec326 100644 --- a/package.json +++ b/package.json @@ -42,7 +42,7 @@ "@cosmjs/tendermint-rpc": "^0.32.1", "@dydxprotocol/v4-abacus": "^1.4.2", "@dydxprotocol/v4-client-js": "^1.0.20", - "@dydxprotocol/v4-localization": "^1.1.25", + "@dydxprotocol/v4-localization": "^1.1.26", "@ethersproject/providers": "^5.7.2", "@js-joda/core": "^5.5.3", "@radix-ui/react-accordion": "^1.1.2", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 41d3607..eac9ab3 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -36,8 +36,8 @@ dependencies: specifier: ^1.0.20 version: 1.0.20 '@dydxprotocol/v4-localization': - specifier: ^1.1.25 - version: 1.1.25 + specifier: ^1.1.26 + version: 1.1.26 '@ethersproject/providers': specifier: ^5.7.2 version: 5.7.2 @@ -1323,8 +1323,8 @@ packages: - utf-8-validate dev: false - /@dydxprotocol/v4-localization@1.1.25: - resolution: {integrity: sha512-84BJMybnZBrRnDpnHlMUcOYT1r0ODtgcdgrjdzTw8b0sViTY6ne9ob690fcn/vQO+6sEdDsdt+08ud0H+ZvyYg==} + /@dydxprotocol/v4-localization@1.1.26: + resolution: {integrity: sha512-u+J1J5Up8McwZOcDaG9GrH/A8p4vD2NU2CT2hPdYyKgEd28XeAYvv7bNAQRKdiBaqTePbbF5uB6TMAQnEGnb1A==} dev: false /@dydxprotocol/v4-proto@4.0.0-dev.0: @@ -8882,7 +8882,7 @@ packages: resolution: {integrity: sha512-WIdaQ8uW1vIbYvNnAVunkC6yxTrneJC7VQ5UUQ0kuw8b0C0A39KTIpoQHCfc8tV7o9vF4niwRhdXEdfAgQEsQQ==} dependencies: cosmos-directory-types: 0.0.6 - node-fetch-native: 1.6.1 + node-fetch-native: 1.6.2 dev: false /cosmos-directory-types@0.0.6: @@ -12892,6 +12892,10 @@ packages: resolution: {integrity: sha512-bW9T/uJDPAJB2YNYEpWzE54U5O3MQidXsOyTfnbKYtTtFexRvGzb1waphBN4ZwP6EcIvYYEOwW0b72BpAqydTw==} dev: false + /node-fetch-native@1.6.2: + resolution: {integrity: sha512-69mtXOFZ6hSkYiXAVB5SqaRvrbITC/NPyqv7yuu/qw0nmgPyYbIMYYNIDhNtwPrzk0ptrimrLz/hhjvm4w5Z+w==} + dev: false + /node-fetch@2.6.12: resolution: {integrity: sha512-C/fGU2E8ToujUivIO0H+tpQ6HWo4eEmchoPIoXtxCrVghxdKq+QOHqEZW7tuP3KlV3bC8FRMO5nMCC7Zm1VP6g==} engines: {node: 4.x || >=6.0.0} diff --git a/src/hooks/usePotentialMarkets.tsx b/src/hooks/usePotentialMarkets.tsx index af1a9d8..443900b 100644 --- a/src/hooks/usePotentialMarkets.tsx +++ b/src/hooks/usePotentialMarkets.tsx @@ -88,7 +88,7 @@ export const usePotentialMarketsContext = () => { impactNotional: 10_000, }, 1: { - label: 'Mid-cap', + label: stringGetter({ key: STRING_KEYS.MID_CAP }), initialMarginFraction: 0.1, maintenanceMarginFraction: 0.05, impactNotional: 5_000, diff --git a/src/pages/token/Governance.tsx b/src/pages/token/Governance.tsx index 1c0fe1f..723f0ec 100644 --- a/src/pages/token/Governance.tsx +++ b/src/pages/token/Governance.tsx @@ -19,7 +19,7 @@ export default () => { diff --git a/src/pages/token/Token.tsx b/src/pages/token/Token.tsx index 38cdc88..6471f21 100644 --- a/src/pages/token/Token.tsx +++ b/src/pages/token/Token.tsx @@ -59,7 +59,7 @@ export default () => { ), - label: 'Staking Rewards', // stringGetter({ key: STRING_KEYS.STAKING_REWARDS }), + label: stringGetter({ key: STRING_KEYS.STAKING_REWARDS }), href: TokenRoute.StakingRewards, tag: stringGetter({ key: STRING_KEYS.NEW }), }, diff --git a/src/pages/token/staking/StakingPage.tsx b/src/pages/token/staking/StakingPage.tsx index ff95117..91b9096 100644 --- a/src/pages/token/staking/StakingPage.tsx +++ b/src/pages/token/staking/StakingPage.tsx @@ -5,18 +5,21 @@ import { layoutMixins } from '@/styles/layoutMixins'; import { DetachedSection } from '@/components/ContentSection'; import { ContentSectionHeader } from '@/components/ContentSectionHeader'; +import { useStringGetter } from '@/hooks'; import { StakingPanel } from './StakingPanel'; import { StrideStakingPanel } from './StrideStakingPanel'; import { DYDXBalancePanel } from '../rewards/DYDXBalancePanel'; +import { STRING_KEYS } from '@/constants/localization'; export default () => { + const stringGetter = useStringGetter(); return ( diff --git a/src/pages/token/staking/StakingPanel.tsx b/src/pages/token/staking/StakingPanel.tsx index 4636a9e..1b934c7 100644 --- a/src/pages/token/staking/StakingPanel.tsx +++ b/src/pages/token/staking/StakingPanel.tsx @@ -23,7 +23,7 @@ export const StakingPanel = ({ className }: { className?: string }) => { className={className} slotHeaderContent={ - Stake with Keplr + {stringGetter({ key: STRING_KEYS.STAKE_WITH_KEPLR })} } diff --git a/src/pages/token/staking/StrideStakingPanel.tsx b/src/pages/token/staking/StrideStakingPanel.tsx index 4eecd8e..e100523 100644 --- a/src/pages/token/staking/StrideStakingPanel.tsx +++ b/src/pages/token/staking/StrideStakingPanel.tsx @@ -24,7 +24,7 @@ export const StrideStakingPanel = ({ className }: { className?: string }) => { slotHeaderContent={ - Liquid Stake with Stride + {stringGetter({ key: STRING_KEYS.LIQUID_STAKE_W_STRIDE })} {stringGetter({ key: STRING_KEYS.NEW })} @@ -33,7 +33,10 @@ export const StrideStakingPanel = ({ className }: { className?: string }) => { onClick={() => dispatch(openDialog({ type: DialogTypes.ExternalNavStride }))} > - {`Stake your ${chainTokenLabel} tokens for st${chainTokenLabel} which you can deploy around the ecosystem.`} + {stringGetter({ + key: STRING_KEYS.LIQUID_STAKE_STRIDE_DESCRIPTION, + params: { TOKEN_DENOM: chainTokenLabel }, + })} e.stopPropagation()}> {stringGetter({ key: STRING_KEYS.LEARN_MORE })} → diff --git a/src/views/dialogs/ExternalLinkDialog.tsx b/src/views/dialogs/ExternalLinkDialog.tsx index e7d8648..231cb24 100644 --- a/src/views/dialogs/ExternalLinkDialog.tsx +++ b/src/views/dialogs/ExternalLinkDialog.tsx @@ -15,6 +15,7 @@ type ElementProps = { link: string; linkDescription?: string; title?: ReactNode; + slotContent?: ReactNode; setIsOpen: (open: boolean) => void; }; @@ -24,6 +25,7 @@ export const ExternalLinkDialog = ({ link, linkDescription, title, + slotContent, }: ElementProps) => { const stringGetter = useStringGetter(); return ( @@ -36,6 +38,7 @@ export const ExternalLinkDialog = ({ } > + {slotContent}

{stringGetter({ key: STRING_KEYS.LEAVING_WEBSITE_DISCLAIMER })}.