Skip to content

Commit

Permalink
feat: remove an unnecessary chain alert filter
Browse files Browse the repository at this point in the history
  • Loading branch information
WhiteMinds committed Nov 2, 2023
1 parent 69d9d07 commit a56f341
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions src/components/Sheet/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,11 @@ import { useMemo } from 'react'
import { SheetPanel, SheetPointPanel, SheetItem } from './styled'
import { useBlockchainAlerts, useNetworkErrMsgs } from '../../services/ExplorerService'

const ALERT_TO_FILTER_OUT = 'CKB v0.105.* have bugs. Please upgrade to the latest version.'

const Sheet = () => {
const { t } = useTranslation()
const networkErrMsgs = useNetworkErrMsgs()
const chainAlerts = useBlockchainAlerts()

const messages = useMemo<string[]>(
() => [...chainAlerts.filter(msg => msg !== ALERT_TO_FILTER_OUT), ...networkErrMsgs],
[chainAlerts, networkErrMsgs],
)
const messages = useMemo<string[]>(() => [...chainAlerts, ...networkErrMsgs], [chainAlerts, networkErrMsgs])

return messages.length > 0 ? (
<SheetPanel>
Expand Down

0 comments on commit a56f341

Please sign in to comment.