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: Change login in field.setValue to use optional operator #12909

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

smilingkylan
Copy link
Contributor

Description

Login view attempts to reset the password input field value but sometimes the ref for the input field is null. Therefore, I have turned fieldRef.setValue to fieldRef?.setValue. Alternatively, since this occurs once successful navigation occurs and component is about to unmount, we may also be able to just remove the line.

Related issues

Addresses this Sentry issue: https://metamask.sentry.io/share/issue/ef784f4e764a4a76bc505dcdaa52c0ec/
GitHub issue: #12653

Manual testing steps

  1. You can manually set the ref to null in the code and login to the app. It should not trigger the catch clause right underneath it.

Screenshots/Recordings

n/a but can producer if necessary

Before

n/a

After

n/a

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 Jan 8, 2025

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.

@smilingkylan smilingkylan added the Run Smoke E2E Triggers smoke e2e on Bitrise label Jan 8, 2025
Copy link
Contributor

github-actions bot commented Jan 8, 2025

https://bitrise.io/ Bitrise

❌❌❌ pr_smoke_e2e_pipeline failed on Bitrise! ❌❌❌

Commit hash: 8d2c748
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/96f277d7-5744-4506-8687-0cf60abdebed

Note

  • You can kick off another pr_smoke_e2e_pipeline on Bitrise by removing and re-applying the Run Smoke E2E label on the pull request

Tip

  • Check the documentation if you have any doubts on how to understand the failure on bitrise

@smilingkylan smilingkylan changed the title [Bug] Change login in field.setValue to use optional operator fix: Change login in field.setValue to use optional operator Jan 8, 2025
@smilingkylan smilingkylan added needs-dev-review PR needs reviews from other engineers (in order to receive required approvals) team-mobile-platform and removed team-mobile-platform labels Jan 8, 2025
Copy link

sonarqubecloud bot commented Jan 8, 2025

@smilingkylan smilingkylan marked this pull request as ready for review January 10, 2025 16:34
@smilingkylan smilingkylan requested a review from a team as a code owner January 10, 2025 16:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-dev-review PR needs reviews from other engineers (in order to receive required approvals) Run Smoke E2E Triggers smoke e2e on Bitrise team-mobile-platform
Projects
Status: Needs dev review
Development

Successfully merging this pull request may close these issues.

1 participant