mirror of
https://github.com/luxfi/safe-wallet.git
synced 2026-07-27 06:55:00 +00:00
refactor(brand): route missed help.safe.global hrefs through brand.helpUrl
Pass-1's URL codemod missed seven JSX/template-string call sites that hardcoded https://help.safe.global directly. Route each through ${brand.helpUrl}/articles/... so non-Safe branded builds point at their own help center (docs.lux.network/safe, docs.hanzo.ai/vault, etc). No protocol identifiers changed; no test fixtures changed; no behavior diff on a build:safe build.
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import EthHashInfo from '@/components/common/EthHashInfo'
|
||||
import useSafeInfo from '@/hooks/useSafeInfo'
|
||||
import { Paper, Grid, Typography, Box, IconButton, SvgIcon } from '@mui/material'
|
||||
import { brand } from '@safe-global/brand'
|
||||
|
||||
import ExternalLink from '@/components/common/ExternalLink'
|
||||
import { RemoveModuleFlow } from '@/components/tx-flow/flows'
|
||||
@@ -82,7 +83,7 @@ const SafeModules = () => {
|
||||
<Typography>
|
||||
Modules allow you to customize the access-control logic of your Safe Account. Modules are potentially
|
||||
risky, so make sure to only use modules from trusted sources. Learn more about modules{' '}
|
||||
<ExternalLink href="https://help.safe.global/articles/5490514177-What-is-a-module?">here</ExternalLink>
|
||||
<ExternalLink href={`${brand.helpUrl}/articles/5490514177-What-is-a-module?`}>here</ExternalLink>
|
||||
</Typography>
|
||||
{safeModules.length === 0 ? (
|
||||
<NoModules />
|
||||
|
||||
@@ -23,6 +23,7 @@ import InfoIcon from '@/public/images/notifications/info.svg'
|
||||
import ErrorMessage from '@/components/tx/ErrorMessage'
|
||||
import ExternalLink from '@/components/common/ExternalLink'
|
||||
import ChainIndicator from '@/components/common/ChainIndicator'
|
||||
import { brand } from '@safe-global/brand'
|
||||
import { txDispatch, TxEvent } from '@/services/tx/txEvents'
|
||||
import { REJECT_TX_EVENTS } from '@/services/analytics/events/reject-tx'
|
||||
import { trackEvent } from '@/services/analytics'
|
||||
@@ -118,7 +119,9 @@ const InternalDeleteTxModal = ({
|
||||
|
||||
<Box mt={2}>
|
||||
Make sure that you are aware of the{' '}
|
||||
<ExternalLink href="https://help.safe.global/articles/4016097317-Why-do-I-need-to-pay-for-cancelling-a-transaction?">
|
||||
<ExternalLink
|
||||
href={`${brand.helpUrl}/articles/4016097317-Why-do-I-need-to-pay-for-cancelling-a-transaction?`}
|
||||
>
|
||||
potential risks
|
||||
</ExternalLink>{' '}
|
||||
related to deleting a transaction off-chain.
|
||||
|
||||
@@ -17,6 +17,7 @@ import TxCard from '@/components/tx-flow/common/TxCard'
|
||||
import DeleteTxModal from './DeleteTxModal'
|
||||
import ExternalLink from '@/components/common/ExternalLink'
|
||||
import ChoiceButton from '@/components/common/ChoiceButton'
|
||||
import { brand } from '@safe-global/brand'
|
||||
import useWallet from '@/hooks/wallets/useWallet'
|
||||
import { sameAddress } from '@safe-global/utils/utils/addresses'
|
||||
import { AppRoutes } from '@/config/routes'
|
||||
@@ -131,7 +132,9 @@ const ReplaceTxMenu = ({
|
||||
<Typography variant="body2" mt={-1} mb={1}>
|
||||
You can replace or reject this transaction on-chain. It requires gas fees and your signature.{' '}
|
||||
<Track {...REJECT_TX_EVENTS.READ_MORE}>
|
||||
<ExternalLink href="https://help.safe.global/articles/4016097317-Why-do-I-need-to-pay-for-cancelling-a-transaction?">
|
||||
<ExternalLink
|
||||
href={`${brand.helpUrl}/articles/4016097317-Why-do-I-need-to-pay-for-cancelling-a-transaction?`}
|
||||
>
|
||||
Read more
|
||||
</ExternalLink>
|
||||
</Track>
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import type { RelaysRemaining } from '@safe-global/store/gateway/AUTO_GENERATED/relay'
|
||||
|
||||
import { Box, FormControl, FormControlLabel, Radio, RadioGroup, Typography, Tooltip, Chip, Link } from '@mui/material'
|
||||
import { brand } from '@safe-global/brand'
|
||||
import type { Dispatch, SetStateAction, ReactElement, ChangeEvent } from 'react'
|
||||
import useWallet from '@/hooks/wallets/useWallet'
|
||||
import WalletIcon from '@/components/common/WalletIcon'
|
||||
@@ -148,7 +149,7 @@ const _ExecutionMethodSelector = ({
|
||||
USDe holders enjoy gasless transactions on Ethereum Mainnet this January.{' '}
|
||||
<Typography component="span" fontWeight="bold">
|
||||
<Link
|
||||
href="https://help.safe.global/articles/9605526657-no-fee-january-campaign"
|
||||
href={`${brand.helpUrl}/articles/9605526657-no-fee-january-campaign`}
|
||||
style={{ textDecoration: 'underline', fontWeight: 'bold' }}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
|
||||
@@ -6,6 +6,7 @@ import useWallet from '@/hooks/wallets/useWallet'
|
||||
import useIsSafeOwner from '@/hooks/useIsSafeOwner'
|
||||
import { useSafeSDK } from '@/hooks/coreSDK/safeCoreSDK'
|
||||
import { Link } from '@mui/material'
|
||||
import { brand } from '@safe-global/brand'
|
||||
|
||||
const NoFeeCampaignBanner = ({ onDismiss }: { onDismiss: () => void }) => {
|
||||
const { setTxFlow } = useContext(TxModalContext)
|
||||
@@ -25,7 +26,7 @@ const NoFeeCampaignBanner = ({ onDismiss }: { onDismiss: () => void }) => {
|
||||
<>
|
||||
No-Fee for Ethena USDe holders on Ethereum Mainnet, this January!{' '}
|
||||
<Link
|
||||
href="https://help.safe.global/articles/9605526657-no-fee-january-campaign"
|
||||
href={`${brand.helpUrl}/articles/9605526657-no-fee-january-campaign`}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
sx={{ color: 'inherit', textDecoration: 'underline', fontWeight: 'bold' }}
|
||||
|
||||
+3
-2
@@ -3,6 +3,7 @@ import { Box, Card, Stack, Typography } from '@mui/material'
|
||||
import Image from 'next/image'
|
||||
import css from './styles.module.css'
|
||||
import Link from 'next/link'
|
||||
import { brand } from '@safe-global/brand'
|
||||
import { useNoFeeCampaignEligibility, useIsNoFeeCampaignEnabled } from '@/features/no-fee-campaign'
|
||||
import BlockedAddress from '@/components/common/BlockedAddress'
|
||||
import { useDarkMode } from '@/hooks/useDarkMode'
|
||||
@@ -70,7 +71,7 @@ const NoFeeCampaignTransactionCard = () => {
|
||||
<Typography variant="body2" color="static.light" className={css.description}>
|
||||
USDe holders enjoy gasless transactions on Ethereum Mainnet this January.{' '}
|
||||
<Link
|
||||
href="https://help.safe.global/articles/9605526657-no-fee-january-campaign"
|
||||
href={`${brand.helpUrl}/articles/9605526657-no-fee-january-campaign`}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
style={{ textDecoration: 'underline', fontWeight: 'bold' }}
|
||||
@@ -116,7 +117,7 @@ const NoFeeCampaignTransactionCard = () => {
|
||||
<Typography variant="body2" className={css.description}>
|
||||
USDe holders enjoy gasless transactions on Ethereum Mainnet this January.{' '}
|
||||
<Link
|
||||
href="https://help.safe.global/articles/9605526657-no-fee-january-campaign"
|
||||
href={`${brand.helpUrl}/articles/9605526657-no-fee-january-campaign`}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
style={{ textDecoration: 'underline', fontWeight: 'bold' }}
|
||||
|
||||
@@ -119,7 +119,7 @@ const SwapWidget = ({ sell }: Params) => {
|
||||
},
|
||||
content: {
|
||||
feeLabel: 'Widget Fee',
|
||||
feeTooltipMarkdown: `The [tiered widget fee](https://help.safe.global/articles/9969629388-How-does-the-widget-fee-work-for-native-swaps) incurred here is charged by CoW Protocol for the operation of this widget. The fee is automatically calculated into this quote. Part of the fee will contribute to a license fee that supports the Safe Community. Neither the Safe Ecosystem Foundation nor ${BRAND_NAME} operate the CoW Swap Widget and/or CoW Swap`,
|
||||
feeTooltipMarkdown: `The [tiered widget fee](${brand.helpUrl}/articles/9969629388-How-does-the-widget-fee-work-for-native-swaps) incurred here is charged by CoW Protocol for the operation of this widget. The fee is automatically calculated into this quote. Part of the fee will contribute to a license fee that supports the Safe Community. Neither the Safe Ecosystem Foundation nor ${BRAND_NAME} operate the CoW Swap Widget and/or CoW Swap`,
|
||||
},
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user