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: add guard for draft tx in send validation #26295

Merged
merged 3 commits into from
Aug 1, 2024
Merged

Conversation

BZahory
Copy link
Contributor

@BZahory BZahory commented Aug 1, 2024

Description

We have discovered a sentry error for the swaps flow in extension:

https://metamask.sentry.io/issues/5659965775/?environment=production&project=273505&query=firstRelease%3A12.0.0&referrer=issue-stream&sort=freq&statsPeriod=90d&stream_index=17

This error is due to the draftTransaction not being defined during validation; this is resolved with an undefined guard. This error appears in other actions; it is resolved in these cases as well.

Open in GitHub Codespaces

Related issues

Fixes:

Manual testing steps

  1. Set state.draftTransactions[state.currentTransactionUUID] to undefined in ducks/send/send.js for all selectors
  2. Go to send flow
  3. Ensure it loads without error

Screenshots/Recordings

Before

Screen.Recording.2024-08-01.at.4.37.55.PM.mov

After

Screen.Recording.2024-08-01.at.4.15.57.PM.mov

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.

@BZahory BZahory requested a review from a team as a code owner August 1, 2024 20:38
Copy link
Contributor

github-actions bot commented Aug 1, 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

codecov bot commented Aug 1, 2024

Codecov Report

Attention: Patch coverage is 87.50000% with 1 line in your changes missing coverage. Please review.

Project coverage is 70.00%. Comparing base (be24e25) to head (bb906c0).

Files Patch % Lines
ui/ducks/send/send.js 87.50% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##           develop   #26295   +/-   ##
========================================
  Coverage    69.99%   70.00%           
========================================
  Files         1410     1410           
  Lines        49958    49964    +6     
  Branches     13798    13801    +3     
========================================
+ Hits         34968    34974    +6     
  Misses       14990    14990           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@metamaskbot
Copy link
Collaborator

Builds ready [75e6c33]
Page Load Metrics (413 ± 389 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint765071308943
domContentLoaded1074302010
load502430413809389
domInteractive1074302010
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 0 Bytes (0.00%)
  • ui: 0 Bytes (0.00%)
  • common: 38 Bytes (0.00%)

@BZahory BZahory force-pushed the send-no-draft-errors branch from 0d499e3 to bb906c0 Compare August 1, 2024 21:12
Copy link

sonarqubecloud bot commented Aug 1, 2024

@metamaskbot
Copy link
Collaborator

Builds ready [bb906c0]
Page Load Metrics (150 ± 174 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint652241054120
domContentLoaded8155343617
load381724150363174
domInteractive8155343617
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 0 Bytes (0.00%)
  • ui: 0 Bytes (0.00%)
  • common: 77 Bytes (0.00%)

@BZahory BZahory merged commit 20dd2d0 into develop Aug 1, 2024
75 checks passed
@BZahory BZahory deleted the send-no-draft-errors branch August 1, 2024 23:20
@github-actions github-actions bot locked and limited conversation to collaborators Aug 1, 2024
@metamaskbot metamaskbot added the release-12.4.0 Issue or pull request that will be included in release 12.4.0 label Aug 1, 2024
@gauthierpetetin gauthierpetetin added release-12.3.0 Issue or pull request that will be included in release 12.3.0 and removed release-12.4.0 Issue or pull request that will be included in release 12.4.0 labels Sep 11, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
release-12.3.0 Issue or pull request that will be included in release 12.3.0 team-bridge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants