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

[Seedless Onboarding] Adjust Account center design #2673

Merged
merged 7 commits into from
Oct 25, 2023

Conversation

usame-algan
Copy link
Member

@usame-algan usame-algan commented Oct 20, 2023

What it solves

Part of #2452

How this PR fixes it

  • Adds a "Enable multifactor authentication" Button to the account center if MFA is not enabled
  • Adds a "Delete Account" Button if its not prod for easier testing
  • Renames WalletInfo to WalletOverview
  • Extracts part of AccountCenter into a new component called WalletInfo for better testability

ToDos

  • Write tests

How to test it

  1. Open a Safe
  2. Connect with a social login for the first time
  3. Open the Account center
  4. Observe a new button to enable mfa that leads to the settings page
  5. Enable MFA
  6. Observe no longer seeing the button in the account center
  7. Observe a Delete Account button if not on prod and logged in with social
  8. Press the Button, reload the page and log in with social
  9. Observe having a new wallet address and MFA is disabled

Screenshots

Screenshot 2023-10-20 at 13 22 01

Checklist

  • I've tested the branch on mobile 📱
  • I've documented how it affects the analytics (if at all) 📊
  • I've written a unit/e2e test for it (if applicable) 🧑‍💻

@github-actions
Copy link

github-actions bot commented Oct 20, 2023

Branch preview

✅ Deploy successful!

https://account_center_mfa--walletweb.review-wallet-web.5afe.dev

@github-actions
Copy link

github-actions bot commented Oct 20, 2023

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 Oct 20, 2023

Coverage report

St.
Category Percentage Covered / Total
🟡 Statements
74.63% (+0.22% 🔼)
9462/12678
🔴 Branches
48.75% (+0.2% 🔼)
1897/3891
🔴 Functions
56.52% (+0.24% 🔼)
1382/2445
🟡 Lines
76.15% (+0.2% 🔼)
8552/11230
Show new covered files 🐣
St.
File Statements Branches Functions Lines
🟢
... / index.tsx
90% 77.78% 80% 91.43%
🟢
... / index.tsx
100% 33.33% 100% 100%
🟢
... / AccountCenter.tsx
94.44% 100% 100% 100%
🟢
... / index.tsx
94.74% 66.67% 100% 100%

Test suite run success

1007 tests passing in 143 suites.

Report generated by 🧪jest coverage report action from 6b59e1c

@usame-algan usame-algan marked this pull request as ready for review October 20, 2023 11:49
@usame-algan usame-algan requested a review from schmanu October 20, 2023 11:49

export const UNKNOWN_CHAIN_NAME = 'Unknown'

const WalletOverview = ({ wallet }: { wallet: ConnectedWallet }): ReactElement => {
Copy link
Member Author

Choose a reason for hiding this comment

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

This is just what WalletInfo was before. Didn't touch any of the code in this file and its styles.

Copy link
Member

@schmanu schmanu left a comment

Choose a reason for hiding this comment

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

Works very well 💯

I made a small suggestion for one of the unit tests but I'll already approve.

})

await waitFor(() => {
expect(disconnectButton).not.toBeInTheDocument()
Copy link
Member

Choose a reason for hiding this comment

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

We should also expect that the onboard disconnectWallet mock gets called here.

@usame-algan usame-algan merged commit 3352841 into web3authcoresdk Oct 25, 2023
7 of 8 checks passed
@usame-algan usame-algan deleted the account-center-mfa branch October 25, 2023 09:14
@github-actions github-actions bot locked and limited conversation to collaborators Oct 25, 2023
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.

2 participants