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 aa3ddab commit 21a8909
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

1 comment on commit 21a8909

@github-actions
Copy link

Choose a reason for hiding this comment

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

Coverage report

St.
Category Percentage Covered / Total
🟡 Statements 75.32% 9432/12522
🔴 Branches 49.5% 1925/3889
🔴 Functions 58.21% 1421/2441
🟡 Lines 76.96% 8537/11093

Test suite run success

1045 tests passing in 142 suites.

Report generated by 🧪jest coverage report action from 21a8909

Please sign in to comment.