Skip to content

Commit

Permalink
Fix: don't modify hint constants
Browse files Browse the repository at this point in the history
  • Loading branch information
katspaugh committed Oct 30, 2023
1 parent e3a00ed commit cd5af8b
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions src/components/walletconnect/WcHints/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,7 @@ import {
} from '@mui/material'
import { useEffect, useState } from 'react'
import type { ReactElement } from 'react'

import { useCurrentChain } from '@/hooks/useChains'
import Question from '@/public/images/common/question.svg'

import css from './styles.module.css'
import { trackEvent } from '@/services/analytics'
import { WALLETCONNECT_EVENTS } from '@/services/analytics/events/walletconnect'
Expand Down Expand Up @@ -71,14 +68,13 @@ const ConnectionSteps = [
const InteractionTitle = 'How do I interact with a dApp?'
const InteractionSteps = [
'Connect a dApp by following the above steps',
`Ensure the dApp is connected to %%chain%%`,
'Ensure the dApp is connected to the same chain as your Safe Account',
'Initiate a transaction/signature request via the dApp',
'Transact/sign as normal via the Safe',
]

const WcHints = (): ReactElement => {
const [expandedAccordion, setExpandedAccordion] = useState<'connection' | 'interaction' | null>(null)
const chain = useCurrentChain()

const onExpand = (accordion: 'connection' | 'interaction') => {
setExpandedAccordion((prev) => {
Expand All @@ -88,10 +84,6 @@ const WcHints = (): ReactElement => {
trackEvent(WALLETCONNECT_EVENTS.HINTS_EXPAND)
}

if (chain?.chainName) {
InteractionSteps[1] = InteractionSteps[1].replace(/%%chain%%/, chain?.chainName)
}

useEffect(() => {
trackEvent(WALLETCONNECT_EVENTS.HINTS_SHOW)
}, [])
Expand Down

0 comments on commit cd5af8b

Please sign in to comment.