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

fix: check if a user is signed in before attempting to sign them out #28874

Merged
merged 2 commits into from
Dec 3, 2024

Conversation

mathieuartu
Copy link
Contributor

@mathieuartu mathieuartu commented Dec 3, 2024

Description

This PR adds a isUserSignedIn check before attempting to sign him out.

Open in GitHub Codespaces

Related issues

Fixes: https://github.com/MetaMask/MetaMask-planning/issues/3709

Manual testing steps

  1. Go to this page...

Screenshots/Recordings

Before

After

Pre-merge author checklist

Pre-merge reviewer checklist

  • I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed).
  • I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.

Copy link
Contributor

github-actions bot commented Dec 3, 2024

CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes.

Copy link
Contributor

@Prithpal-Sooriya Prithpal-Sooriya left a comment

Choose a reason for hiding this comment

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

LGTM - this ensures that we check the auth state before performing sign out 👍🏾

We can create a separate PR that decouples UI interactions and instead uses the background messaging stateChanged event - see gist

@metamaskbot
Copy link
Collaborator

Builds ready [b0bfe1b]
Page Load Metrics (2448 ± 380 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint314432820071100528
domContentLoaded163342792406782376
load167643432448790380
domInteractive294959910148
backgroundConnect9121473617
firstReactRender8358615211254
getState475302311
initialActions01000
loadScripts119333571796649312
setupStore65716157
uiStartup182852032749954458
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 43 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

@mathieuartu mathieuartu marked this pull request as ready for review December 3, 2024 17:44
@mathieuartu mathieuartu requested a review from a team as a code owner December 3, 2024 17:44
@mathieuartu mathieuartu added this pull request to the merge queue Dec 3, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Dec 3, 2024
@metamaskbot
Copy link
Collaborator

Builds ready [86b39c9]
Page Load Metrics (2057 ± 69 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint71123511992329158
domContentLoaded17912334202414871
load18022348205714369
domInteractive248337157
backgroundConnect87127199
firstReactRender1695302713
getState1073211656330
initialActions01000
loadScripts13641857157113464
setupStore78312168
uiStartup20762805243019895
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 43 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

@mathieuartu mathieuartu added this pull request to the merge queue Dec 3, 2024
Merged via the queue into main with commit 4534f9a Dec 3, 2024
78 checks passed
@mathieuartu mathieuartu deleted the fix/metametrics_sign_out_logic branch December 3, 2024 19:00
@github-actions github-actions bot locked and limited conversation to collaborators Dec 3, 2024
@metamaskbot metamaskbot added the release-12.10.0 Issue or pull request that will be included in release 12.10.0 label Dec 3, 2024
@mathieuartu mathieuartu self-assigned this Dec 3, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
release-12.10.0 Issue or pull request that will be included in release 12.10.0 team-identity
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants