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

Conversation

@usame-algan
Copy link
Contributor

What it solves

Resolves #3624

How this PR fixes it

Instead of normally importing the css within PairingDetails and leaving it there we now import it on mount and remove it once the component unmounts.

Additional refactors

wrapInSuspense was moved closer to the component that required it (PairingDetails)

How to test it

  1. Open the Safe app
  2. Connect to a network that has mobile pairing enabled
  3. Click "Connect Wallet
  4. Switch to a network that has mobile pairing disabled e.g. Gnosis Chain
  5. Click on "Connect Wallet" > "Connect"
  6. Observe that MetaMask (first wallet) is visible

Screenshot

Screenshot 2022-03-07 at 12 15 13

@usame-algan usame-algan requested a review from iamacook March 7, 2022 11:17
@github-actions
Copy link

github-actions bot commented Mar 7, 2022

CLA Assistant Lite All Contributors have signed the CLA.

@github-actions
Copy link

github-actions bot commented Mar 7, 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

@github-actions
Copy link

github-actions bot commented Mar 7, 2022

Deployment links

🟠 Rinkeby Mainnet 🟣 Polygon 🟡 BSC Arbitrum 🟢 Gnosis Chain

@coveralls
Copy link

coveralls commented Mar 7, 2022

Pull Request Test Coverage Report for Build 1945356973

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

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/components/AppLayout/Header/index.tsx 0 1 0.0%
src/components/AppLayout/Header/components/ProviderDetails/PairingDetails.tsx 0 7 0.0%
Files with Coverage Reduction New Missed Lines %
src/components/AppLayout/Header/index.tsx 1 0%
src/components/AppLayout/Header/components/ProviderDetails/PairingDetails.tsx 2 0%
Totals Coverage Status
Change from base Build 1932713526: -0.02%
Covered Lines: 3364
Relevant Lines: 8726

💛 - Coveralls

Copy link
Contributor

@iamacook iamacook left a comment

Choose a reason for hiding this comment

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

Sleek approach!

// Hides first wallet in Onboard modal (pairing module)
useEffect(() => {
const style = document.createElement('style')
style.innerHTML = '.bn-onboard-modal-select-wallets li:first-of-type {display: none;}'
Copy link
Contributor

Choose a reason for hiding this comment

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

Please extract this into a constant.

@github-actions
Copy link

github-actions bot commented Mar 7, 2022

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

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

Copy link
Contributor

@iamacook iamacook left a comment

Choose a reason for hiding this comment

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

👍

@francovenica
Copy link
Contributor

it seems that only the the GC was the one not supporting the pairing (or at least is the only network not showing the option to pair it).
It looks good, the MM icon shows every time there

@iamacook iamacook merged commit c277874 into dev Mar 7, 2022
@iamacook iamacook deleted the fix-hide-pairing branch March 7, 2022 15:36
@github-actions github-actions bot locked and limited conversation to collaborators Mar 7, 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

5 participants