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 all 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 cypress/e2e/safe-apps/apps_list.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ describe('Safe Apps tests', () => {
beforeEach(() => {
cy.clearLocalStorage()
cy.visit(constants.SEPOLIA_TEST_SAFE_4 + constants.appsUrl, { failOnStatusCode: false })
main.acceptCookies(1)
main.acceptCookies()
})

it('Verify app list can be filtered by app name [C56130]', () => {
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/safe-apps/browser_permissions.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ describe('Browser permissions tests', () => {
})
})
cy.visitSafeApp(`${constants.testAppUrl}/app`)
main.acceptCookies(1)
main.acceptCookies()
})

it('Verify a permissions slide to the user is displayed [C56137]', () => {
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/safe-apps/drain_account.spec.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ describe('Drain Account Safe App tests', { defaultCommandTimeout: 12000 }, () =>

cy.clearLocalStorage()
cy.visit(visitUrl)
main.acceptCookies(1)
main.acceptCookies()
safeapps.clickOnContinueBtn()
})

Expand Down
4 changes: 2 additions & 2 deletions cypress/e2e/safe-apps/safe_permissions.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ describe('Safe permissions system tests', () => {

it('Verify that requesting permissions with wallet_requestPermissions shows the permissions prompt and return the permissions on accept [C56150]', () => {
cy.visitSafeApp(constants.testAppUrl + constants.requestPermissionsUrl)
main.acceptCookies(1)
main.acceptCookies()
safeapps.clickOnContinueBtn()
safeapps.verifyWarningDefaultAppMsgIsDisplayed()
safeapps.clickOnContinueBtn()
Expand Down Expand Up @@ -56,7 +56,7 @@ describe('Safe permissions system tests', () => {
})

cy.visitSafeApp(constants.testAppUrl + constants.getPermissionsUrl)
main.acceptCookies(1)
main.acceptCookies()
safeapps.clickOnContinueBtn()
safeapps.verifyWarningDefaultAppMsgIsDisplayed()
safeapps.clickOnContinueBtn()
Expand Down
4 changes: 2 additions & 2 deletions cypress/e2e/safe-apps/tx-builder.spec.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ describe('Tx-builder Safe App tests', { defaultCommandTimeout: 20000 }, () => {
beforeEach(() => {
cy.clearLocalStorage()
cy.visit(visitUrl)
main.acceptCookies(1)
main.acceptCookies()
safeapps.clickOnContinueBtn()
})

Expand Down Expand Up @@ -146,7 +146,7 @@ describe('Tx-builder Safe App tests', { defaultCommandTimeout: 20000 }, () => {
getBody().findByText(safeapps.createBatchStr).click()
getBody().findByText(safeapps.sendBatchStr).click()
})
cy.get('p').contains('1').should('be.visible')
cy.get('p').contains('1').should('exist')
cy.get('p').contains('2').should('be.visible')
})

Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/smoke/add_owner.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ describe('Add Owners tests', () => {
beforeEach(() => {
cy.visit(constants.setupUrl + constants.SEPOLIA_TEST_SAFE_1)
cy.clearLocalStorage()
main.acceptCookies(1)
main.acceptCookies()
cy.contains(owner.safeAccountNonceStr, { timeout: 10000 })
})

Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/smoke/address_book.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ describe('Address book tests', () => {
beforeEach(() => {
cy.clearLocalStorage()
cy.visit(constants.addressBookUrl + constants.SEPOLIA_TEST_SAFE_1)
main.acceptCookies(1)
main.acceptCookies()
})

it('Verify entry can be added [C56061]', () => {
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/smoke/assets.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ describe('Assets tests', () => {
beforeEach(() => {
cy.visit(constants.BALANCE_URL + constants.SEPOLIA_TEST_SAFE_5)
cy.clearLocalStorage()
main.acceptCookies(2)
main.acceptCookies()
})

it('Verify that the token tab is selected by default and the table is visible [C56039]', () => {
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/smoke/balances.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ describe('Balance tests', () => {
beforeEach(() => {
cy.clearLocalStorage()
cy.visit(constants.BALANCE_URL + constants.SEPOLIA_TEST_SAFE_5)
main.acceptCookies(2)
main.acceptCookies()
cy.contains('Assets')
cy.get(balances.balanceSingleRow).should('have.length.lessThan', ASSETS_LENGTH)
balances.selectTokenList(balances.tokenListOptions.allTokens)
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/smoke/balances_pagination.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ describe('Balance tests', () => {
cy.clearLocalStorage()
// Open the Safe used for testing
cy.visit(constants.BALANCE_URL + constants.SEPOLIA_TEST_SAFE_6)
main.acceptCookies(2)
main.acceptCookies()

balances.selectTokenList(balances.tokenListOptions.allTokens)
})
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/smoke/batch_tx.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ describe('Batch transaction tests', () => {
beforeEach(() => {
cy.clearLocalStorage()
cy.visit(constants.BALANCE_URL + constants.SEPOLIA_TEST_SAFE_5)
main.acceptCookies(2)
main.acceptCookies()
})

it('Verify empty batch list can be opened [C56082]', () => {
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/smoke/create_tx.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ describe('Create transactions tests', () => {
before(() => {
cy.clearLocalStorage()
cy.visit(constants.BALANCE_URL + constants.SEPOLIA_TEST_SAFE_5)
main.acceptCookies(2)
main.acceptCookies()
})

it('Verify a new send token transaction can be created [C56104]', () => {
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/smoke/dashboard.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ describe('Dashboard tests', () => {
beforeEach(() => {
cy.clearLocalStorage()
cy.visit(constants.BALANCE_URL + constants.SEPOLIA_TEST_SAFE_5)
main.acceptCookies(2)
main.acceptCookies()
main.clickOnSideMenuItem(constants.mainSideMenuOptions.home)
dashboard.verifyConnectTransactStrIsVisible()
})
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/smoke/import_export_data.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ describe('Import Export Data tests', () => {
})

it('Verify address book imported data [C56112]', () => {
main.acceptCookies(1)
main.acceptCookies()
file.clickOnAddressBookBtn()
file.verifyImportedAddressBookData()
})
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/smoke/nfts.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ describe('NFTs tests', () => {
beforeEach(() => {
cy.clearLocalStorage()
cy.visit(constants.BALANCE_URL + constants.SEPOLIA_TEST_SAFE_5)
main.acceptCookies(2)
main.acceptCookies()
nfts.clickOnNftsTab()
})

Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/smoke/tx_history.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ describe('Transaction history tests', () => {
// So that tests that rely on this feature don't randomly fail
cy.window().then((win) => win.localStorage.setItem('SAFE_v2__AB_human-readable', true))

main.acceptCookies(1)
main.acceptCookies()
})

it('Verify October 29th transactions are displayed [C56128]', () => {
Expand Down
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