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: Currently keystone lib will throw KeystoneError#Tx_canceled which will crash the mobile app #13313

Merged
merged 2 commits into from
Feb 3, 2025

Conversation

dawnseeker8
Copy link
Contributor

Description

This PR will fix #13259 issue.
When user reject signature in QR screen, the @keystonehq/metamask-airgapped-keyring will throw KeystoneError#Tx_canceled error. however, for some reason, Hermes engine threat that error as object and go to Crash flow.
I have fixed it by adding above uncatch error into our global ErrorHandler.ts to specially thread it.

Related issues

Fixes:

Manual testing steps

  Scenario: Swap with QR account and Reject QR modal
  
  GIVEN I have QR account selected
  WHEN I swap
  AND Reject QR modal
  THEN modal is closed (FAILED: app closes and crash alert is displayed)
  AND app is still functioning (FAILED)

Screenshots/Recordings

Before

Screen.Recording.2025-01-29.at.12.39.27.PM.mov

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.

…or handler to prevent it crash the hermes engine.
@dawnseeker8 dawnseeker8 added team-hardware-wallets Run Smoke E2E Triggers smoke e2e on Bitrise labels Feb 3, 2025
@dawnseeker8 dawnseeker8 requested a review from a team as a code owner February 3, 2025 12:52
Copy link
Contributor

github-actions bot commented Feb 3, 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.

Copy link
Contributor

github-actions bot commented Feb 3, 2025

https://bitrise.io/ Bitrise

❌❌❌ pr_smoke_e2e_pipeline failed on Bitrise! ❌❌❌

Commit hash: 3f111a8
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/319d0e08-9dae-4048-b3a2-546701068b66

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

@dawnseeker8 dawnseeker8 added the needs-dev-review PR needs reviews from other engineers (in order to receive required approvals) label Feb 3, 2025
Copy link
Contributor

@sethkfman sethkfman left a comment

Choose a reason for hiding this comment

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

LGTM

@sethkfman sethkfman added this pull request to the merge queue Feb 3, 2025
Merged via the queue into main with commit d01cf65 Feb 3, 2025
40 of 41 checks passed
@sethkfman sethkfman deleted the fix/13259-fix-app-crash-reject-signature branch February 3, 2025 17:44
@github-actions github-actions bot locked and limited conversation to collaborators Feb 3, 2025
@github-actions github-actions bot removed the needs-dev-review PR needs reviews from other engineers (in order to receive required approvals) label Feb 3, 2025
@metamaskbot metamaskbot added the release-7.41.0 Issue or pull request that will be included in release 7.41.0 label Feb 3, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
release-7.41.0 Issue or pull request that will be included in release 7.41.0 Run Smoke E2E Triggers smoke e2e on Bitrise team-hardware-wallets
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

[Bug]: App crash after tapping 'Reject' on QR modal to swap
3 participants