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

Feat: mobile pairing in Safe creation #3867

Merged
merged 14 commits into from
May 17, 2022
Merged

Conversation

katspaugh
Copy link
Member

@katspaugh katspaugh commented May 9, 2022

Part of safe-global/safe-pm#54

Design: https://www.figma.com/file/C9TgnaMpQQvLAEYP8Bvl5X/Mobile-App-on-Web?node-id=60%3A6107

Adds the Mobile Pairing module to the Safe creation stepper.

Screenshot 2022-05-09 at 16 15 07

@katspaugh katspaugh requested a review from iamacook May 9, 2022 14:21
@github-actions
Copy link

github-actions bot commented May 9, 2022

CLA Assistant Lite All Contributors have signed the CLA.

@github-actions
Copy link

github-actions bot commented May 9, 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 1 N/A
  • Result: ✅ success
  • Annotations: 0 total

Report generated by eslint-plus-action

@github-actions
Copy link

github-actions bot commented May 9, 2022

Deployment links

🟠 Rinkeby Mainnet 🟣 Polygon 🟡 BSC Arbitrum 🟢 Gnosis Chain

Copy link
Member

@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.

The code looks good to me but has the design been cleared by @liliiaorlenko? The alignment is a bit odd:

image

A few findings:

  • The alignment of the description in the wallet popper is no longer centred:
    image

  • On high res. screens the two are very far apart:
    image

  • There are failing tests.

@katspaugh katspaugh marked this pull request as draft May 9, 2022 14:34
@katspaugh
Copy link
Member Author

Strange, wallet connection stopped working.

@coveralls
Copy link

coveralls commented May 9, 2022

Pull Request Test Coverage Report for Build 2337865346

  • 14 of 40 (35.0%) changed or added relevant lines in 10 files are covered.
  • 11 unchanged lines in 1 file lost coverage.
  • Overall coverage increased (+0.1%) to 37.028%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/logic/wallets/onboard.ts 0 1 0.0%
src/utils/storage/index.ts 1 2 50.0%
src/logic/wallets/pairing/utils.ts 0 4 0.0%
src/components/AppLayout/Header/index.tsx 0 5 0.0%
src/components/AppLayout/Header/components/ProviderDetails/PairingDetails.tsx 0 15 0.0%
Files with Coverage Reduction New Missed Lines %
src/logic/wallets/pairing/module.ts 11 10.53%
Totals Coverage Status
Change from base Build 2337341027: 0.1%
Covered Lines: 3854
Relevant Lines: 9475

💛 - Coveralls

@katspaugh katspaugh force-pushed the mobile-pairing-safe-creation branch from 2a58393 to 91124aa Compare May 10, 2022 13:55
@katspaugh katspaugh force-pushed the mobile-pairing-safe-creation branch from 91124aa to 021ea2d Compare May 12, 2022 12:23
@katspaugh katspaugh marked this pull request as ready for review May 12, 2022 12:28
@katspaugh katspaugh requested a review from iamacook May 12, 2022 12:28
Copy link
Member

@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.

All looks good to me. The alignment is still a little off but I think it's fine:

image

@@ -43,3 +43,7 @@ export const saveToStorageWithExpiry = <T = unknown>(key: string, value: T, expi
export const loadFromStorageWithExpiry = <T = unknown>(key: string): T | undefined => {
return storage.getWithExpiry<T>(key)
}

export const removeFromStorageWithExpiry = (key: string): void => {
Copy link
Member

Choose a reason for hiding this comment

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

The name of this threw me off at first.

Copy link
Member Author

Choose a reason for hiding this comment

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

It's a hairy name but consistent with the other two.

@francovenica
Copy link
Contributor

Probably unrelated to this ticket, but the post-connection message is different than what it was. I assume it was changed on purpose
image

Prod:
image

@francovenica
Copy link
Contributor

francovenica commented May 16, 2022

This is something that only happens in this PR. In dev and prod it works fine.

Once you use the QR code, disconnect and use the "reload icon" button to create a new one, the icon in the dropdown is a "zoomed in" version of the QR code, and it doesn't work:
image

To reproduce:
Connect with the QR code in the mobile safe app
Accept the connection
Open the dropdown in the top right
Disconnect
The reload QR code button shows up
Use the one in the dropdown to reload the QR code
Compare the 2 icons in the safe creation 1st step

@francovenica
Copy link
Contributor

The rest works fine

@katspaugh
Copy link
Member Author

Probably unrelated to this ticket, but the post-connection message is different than what it was. I assume it was changed on purpose

Yes, I took the opportunity to groom those messages a bit.

@katspaugh
Copy link
Member Author

@francovenica great catch with the QR code refresh, fixed ✅

@francovenica
Copy link
Contributor

The QR code refresh is fixed. Looks good to me

@katspaugh katspaugh merged commit 6f39b3b into dev May 17, 2022
@katspaugh katspaugh deleted the mobile-pairing-safe-creation branch May 17, 2022 12:06
@github-actions github-actions bot locked and limited conversation to collaborators May 17, 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.

4 participants