Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Remove WC onboarding tooltip #2746

Merged
merged 6 commits into from
Nov 9, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion public/images/logo-round.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
24 changes: 8 additions & 16 deletions src/components/walletconnect/WcHeaderWidget/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ import { type ReactNode, useRef } from 'react'
import type { SessionTypes } from '@walletconnect/types'
import Popup from '@/components/common/Popup'
import WcIcon from './WcIcon'
import { OnboardingTooltip } from '@/components/common/OnboardingTooltip'
import useSafeInfo from '@/hooks/useSafeInfo'

type WcHeaderWidgetProps = {
children: ReactNode
Expand All @@ -14,25 +12,19 @@ type WcHeaderWidgetProps = {
onClose: () => void
}

const TOOLTIP_TEXT = 'Connect Safe{Wallet} to any dApp with WalletConnect'
const TOOLTIP_ID = 'native_wc_onboarding'

const WcHeaderWidget = ({ sessions, ...props }: WcHeaderWidgetProps) => {
const iconRef = useRef<HTMLDivElement>(null)
const { safeLoaded } = useSafeInfo()

return (
<>
<OnboardingTooltip text={safeLoaded ? TOOLTIP_TEXT : ''} widgetLocalStorageId={TOOLTIP_ID}>
<div ref={iconRef}>
<WcIcon
onClick={props.onOpen}
sessionCount={sessions.length}
sessionIcon={sessions[0]?.peer.metadata.icons[0]}
isError={props.isError}
/>
</div>
</OnboardingTooltip>
<div ref={iconRef}>
<WcIcon
onClick={props.onOpen}
sessionCount={sessions.length}
sessionIcon={sessions[0]?.peer.metadata.icons[0]}
isError={props.isError}
/>
</div>

<Popup keepMounted anchorEl={iconRef.current} open={props.isOpen} onClose={props.onClose}>
{props.children}
Expand Down
Loading