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

Converting ExternalWalletLinkingFailedNotification notifications into modals. #10469

Merged

Conversation

szilardszaloki
Copy link
Collaborator

@szilardszaloki szilardszaloki commented Oct 12, 2021

Resolves brave/brave-browser#16652 (resolves brave/brave-browser#13997, resolves brave/brave-browser#16650).

  • uphold_bat_not_allowed_for_user ==> upholdBATNotAllowedModal
  • uphold_blocked_user ==> upholdBlockedUserModal
  • uphold_pending_user ==> upholdPendingUserModal
  • uphold_restricted_user ==> upholdRestrictedUserModal
  • wallet_device_limit_reached ==> deviceLimitReachedModal
  • wallet_mismatched_provider_accounts ==> mismatchedProviderAccountsModal
  • fixing the upholdBATNotAllowedModal modal

Submitter Checklist:

  • I confirm that no security/privacy review is needed, or that I have requested one
  • There is a ticket for my issue
  • Used Github auto-closing keywords in the PR description above
  • Wrote a good PR/commit description
  • Added appropriate labels (QA/Yes or QA/No; release-notes/include or release-notes/exclude; OS/...) to the associated issue
  • Checked the PR locally: npm run test -- brave_browser_tests, npm run test -- brave_unit_tests, npm run lint, npm run gn_check, npm run tslint
  • Ran git rebase master (if needed)

Reviewer Checklist:

  • A security review is not needed, or a link to one is included in the PR description
  • New files have MPL-2.0 license header
  • Adequate test coverage exists to prevent regressions
  • Major classes, functions and non-trivial code blocks are well-commented
  • Changes in component dependencies are properly reflected in gn
  • Code follows the style guide
  • Test plan is specified in PR before merging

After-merge Checklist:

Test Plan:

There are 7 modals altogether that need to be tested:

  • Provider-agnostic:
    • deviceLimitReachedModal (Learn More goes here):
      deviceLimitReachedModal
      Try reaching the device limit.
    • kycRequiredModal (No Learn More links) – Uphold example:
      kycRequiredModal
      Try verifying your Rewards wallet with a non-KYC'd wallet provider account.
    • mismatchedProviderAccountsModal (Learn More goes here) – Uphold example:
      mismatchedProviderAccountsModal
      Verify your Rewards wallet with a wallet provider, manually disconnect, then try verifying your Rewards wallet with a different account from the same provider.
  • Uphold-specific (here is how you can repro the use-cases for the below modals):
    • upholdBATNotAllowedModal (Learn More goes here):
      upholdBATNotAllowedModal
    • upholdBlockedUserModal (Learn More goes here):
      upholdBlockedUserModal
    • upholdPendingUserModal (Learn More goes here):
      upholdPendingUserModal
    • upholdRestrictedUserModal (Learn More goes here):
      upholdRestrictedUserModal

Make sure you don't see the corresponding notifications that we showed previously.

@szilardszaloki szilardszaloki requested a review from a team as a code owner October 12, 2021 11:03
@szilardszaloki szilardszaloki force-pushed the sszaloki-16652-converting-notifications-into-modals branch from 790b35b to 75373d1 Compare October 12, 2021 11:44
@szilardszaloki szilardszaloki force-pushed the sszaloki-16652-converting-notifications-into-modals branch from 75373d1 to c04f4f3 Compare October 12, 2021 14:47
Copy link
Collaborator

@zenparsing zenparsing left a comment

Choose a reason for hiding this comment

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

Looks good to me. I know SonarCloud is complaining, but I don't necessarily see a problem.

…to modals.

- `uphold_bat_not_allowed_for_user` `==>` `upholdBATNotAllowedModal`
- `uphold_blocked_user` `==>` `upholdBlockedUserModal`
- `uphold_pending_user` `==>` `upholdPendingUserModal`
- `uphold_restricted_user` `==>` `upholdRestrictedUserModal`
- `wallet_device_limit_reached` `==>` `deviceLimitReachedModal`
- `wallet_mismatched_provider_accounts` `==>` `mismatchedProviderAccountsModal`
- fixing the `upholdBATNotAllowedModal` modal
@szilardszaloki szilardszaloki force-pushed the sszaloki-16652-converting-notifications-into-modals branch from c04f4f3 to 3eaf763 Compare October 12, 2021 15:49
@szilardszaloki
Copy link
Collaborator Author

SonarCloud is reporting duplicated lines due to how we currently structure code in settingsPage.tsx.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment