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: (cherry-pick Version v12.0.0) Cannot destructure property 'balance' of 'K[Z]' as it is undefined fromAddress error when no transaction is loaded in ConfirmTransactionBase #25566

Merged

Conversation

digiwand
Copy link
Contributor

@digiwand digiwand commented Jun 27, 2024

Description

Cherry-pick #25506 for Version-v12.0.0

Open in GitHub Codespaces

Related issues

Fixes: #25406

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.

…ned` fromAddress error when no transaction is loaded in ConfirmTransactionBase (#25506)

In `confirm-transaction-base.container.js`, while the transaction is
switching, the component may be in a state without transaction data. In
this case, we can handle the empty transaction data appropriately until
the expected data comes in to allow the user flow to continue without
breaking.

**note:** I was unable to reproduce this in `develop` after some time,
but I successfully repro'd this in `Version-v12.0.0` which allowed me to
verify the fix works. Possibly the underlying empty transaction data
state was fixed by other code in `develop`

This PR is planned to be cherry-picked for Version-v12.0.0

Fixes: #25406

See [Issue](#25406)
for repro steps

`confirm-transaction-base.container.js`
![CleanShot 2024-06-25 at 15 58
13@2x](https://github.com/MetaMask/metamask-extension/assets/20778143/4c3ccc3f-8583-4b76-b6cc-9bebc1f1045c)

See error in
[Issue](#25406)
screenshots

No error message is shown and app works as expected

<!-- [screenshots/recordings] -->

- [ ] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask
Extension Coding
Standards](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/CODING_GUIDELINES.md).
- [ ] I've completed the PR template to the best of my ability
- [ ] I’ve included tests if applicable
- [ ] I’ve documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [ ] I’ve applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.

- [ ] 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.
@digiwand digiwand added team-confirmations Push issues to confirmations team release-12.0.0 Issue or pull request that will be included in release 12.0.0 labels Jun 27, 2024
@digiwand digiwand requested a review from a team as a code owner June 27, 2024 16:11
Copy link
Contributor

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 Jun 27, 2024

Codecov Report

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

Project coverage is 65.60%. Comparing base (f5631fb) to head (ea84b69).

Files Patch % Lines
...saction-base/confirm-transaction-base.container.js 66.67% 1 Missing ⚠️
Additional details and impacted files
@@                 Coverage Diff                 @@
##           Version-v12.0.0   #25566      +/-   ##
===================================================
- Coverage            65.60%   65.60%   -0.00%     
===================================================
  Files                 1361     1361              
  Lines                54308    54310       +2     
  Branches             14103    14105       +2     
===================================================
+ Hits                 35627    35628       +1     
- Misses               18681    18682       +1     

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

@metamaskbot
Copy link
Collaborator

Builds ready [ea84b69]
Page Load Metrics (54 ± 4 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint701088784
domContentLoaded9131111
load42705494
domInteractive9131111
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 70.23 KiB (2.03%)
  • ui: 7.17 KiB (0.11%)
  • common: 169.94 KiB (2.70%)

@danjm danjm merged commit 5131f18 into Version-v12.0.0 Jun 27, 2024
79 of 80 checks passed
@danjm danjm deleted the Version-v12.0.0-fix-tx-missing-balance-fromAddress branch June 27, 2024 16:57
@github-actions github-actions bot locked and limited conversation to collaborators Jun 27, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
release-12.0.0 Issue or pull request that will be included in release 12.0.0 team-confirmations Push issues to confirmations team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants