Skip to content
This repository has been archived by the owner on Nov 10, 2023. It is now read-only.

fix: Hide first wallet in onboard modal if mobile pairing is enabled #3654

Merged
merged 2 commits into from
Mar 14, 2022

Conversation

usame-algan
Copy link
Member

What it solves

Resolves #3624

How this PR fixes it

Instead of including the css for hiding the first wallet within PairingDetails it is now included within the Header component that always exists.

How to test it

  1. Open the Safe app
  2. Navigate to Create Safe
  3. Click on Connect
  4. Observe that "Safe Mobile" Link is not visible
  5. Click on Connect Wallet > Connect in the Header
  6. Observe that "Safe Mobile" Link is not visible

@github-actions
Copy link

CLA Assistant Lite All Contributors have signed the CLA.

@github-actions
Copy link

github-actions bot commented Mar 11, 2022

ESLint Summary View Full Report

Annotations are provided inline on the Files Changed tab. You can also see all annotations that were generated on the annotations page.

Type Occurrences Fixable
Errors 0 0
Warnings 0 0
Ignored 0 N/A
  • Result: ✅ success
  • Annotations: 0 total

Report generated by eslint-plus-action

@coveralls
Copy link

coveralls commented Mar 11, 2022

Pull Request Test Coverage Report for Build 1968666002

  • 0 of 12 (0.0%) changed or added relevant lines in 2 files are covered.
  • 2 unchanged lines in 2 files lost coverage.
  • Overall coverage decreased (-0.02%) to 34.854%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/components/AppLayout/Header/index.tsx 0 3 0.0%
src/components/AppLayout/Header/components/ProviderDetails/HidePairingModule.tsx 0 9 0.0%
Files with Coverage Reduction New Missed Lines %
src/components/AppLayout/Header/components/ProviderDetails/ConnectDetails.tsx 1 0%
src/components/AppLayout/Header/components/ProviderDetails/PairingDetails.tsx 1 0%
Totals Coverage Status
Change from base Build 1968571522: -0.02%
Covered Lines: 3375
Relevant Lines: 8774

💛 - Coveralls

@github-actions
Copy link

Deployment links

🟠 Rinkeby Mainnet 🟣 Polygon 🟡 BSC Arbitrum 🟢 Gnosis Chain

@@ -0,0 +1,6 @@
import 'src/components/AppLayout/Header/components/ProviderDetails/hidePairingModule.css'
Copy link
Member

Choose a reason for hiding this comment

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

Shouldn't this dynamically inject when (un-)mounting?

Copy link
Member Author

Choose a reason for hiding this comment

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

Mobile Pairing is enabled on every network now so we don't need to remove the css anymore on unmount

Copy link
Member

Choose a reason for hiding this comment

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

It is for now, but it may not be on added networks in the future.

Copy link
Member Author

@usame-algan usame-algan Mar 11, 2022

Choose a reason for hiding this comment

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

Good point! I have changed it back to how it was before in case a network doesn't support it but including it in the Header to solve this issue

import 'src/components/AppLayout/Header/components/ProviderDetails/hidePairingModule.css'
import { ReactElement } from 'react'

const HidePairingModule = (): ReactElement => <></>
Copy link
Member

Choose a reason for hiding this comment

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

You could return null here to spare mounting a component in the tree, albeit just a fragment.

@github-actions
Copy link

github-actions bot commented Mar 11, 2022

E2E Tests Failed
Check the results here: https://github.com/gnosis/safe-react-e2e-tests/actions/runs/1968698996

Failed tests:

  • ❌ Add an existing safe Add an existing safe
  • ❌ Read-only transaction creation and review Read-only transaction creation and review
  • ❌ Safe Apps List Safe Apps List

@francovenica
Copy link
Contributor

Looks good to me

@usame-algan usame-algan merged commit 7dce28e into dev Mar 14, 2022
@usame-algan usame-algan deleted the fix-hide-first-wallet-global branch March 14, 2022 11:01
@github-actions github-actions bot locked and limited conversation to collaborators Mar 14, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

First wallet options remains hidden
4 participants