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: finding and updating transaction errors in confirmation pages state #7319

Merged
merged 8 commits into from
Oct 17, 2023

Conversation

jpuri
Copy link
Contributor

@jpuri jpuri commented Sep 25, 2023

Description

The PR fixes the issue - whenever loading balance is delayed, the Warning for needing more ETH is displayed and cannot perform the tx once the balance is loaded.
The reason for this issue was wrong state update for error, I fixed this but re-calculating error every time transaction / user balance / contracts balance changes. Thus as soon as balance is fetched the error goes away.

Manual testing steps

  1. Go to test-dapp
  2. Simulate a slow response from the getBalance request
  3. Click on Send EIP1559
  4. See how warning for needing more ETH appears and Confirm button is disabled
  5. Wait until correct balance is loaded
  6. See how warning is removed and Confirm button is still enabled

Related issues

_Fixes #6535

Pre-merge author checklist

  • I’ve followed MetaMask Coding Standards.
  • I've clearly explained:
    • What problem this PR is solving.
    • How this problem was solved.
    • How reviewers can test my changes.
  • I’ve indicated what issue this PR is linked to: Fixes #???
  • I’ve included tests if applicable.
  • I’ve documented any added code.
  • I’ve applied the right labels on the PR (see labeling guidelines).
  • I’ve properly set the pull request status:
    • In case it's not yet "ready for review", I've set it to "draft".
    • In case it's "ready for review", I've changed it from "draft" to "non-draft".

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.

@jpuri jpuri added needs-dev-review PR needs reviews from other engineers (in order to receive required approvals) team-confirmations-secure-ux-PR PR from the confirmations team labels Sep 25, 2023
@jpuri jpuri requested a review from a team as a code owner September 25, 2023 14:56
@github-actions
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.

@jpuri jpuri changed the title Fix finding and updating error in confirmation pages state fixes: finding and updating error in confirmation pages state Sep 25, 2023
@jpuri jpuri changed the title fixes: finding and updating error in confirmation pages state fix: finding and updating transaction errors in confirmation pages state Sep 26, 2023
@codecov-commenter
Copy link

codecov-commenter commented Sep 26, 2023

Codecov Report

Attention: 7 lines in your changes are missing coverage. Please review.

Comparison is base (46b493b) 34.59% compared to head (2c33732) 34.60%.
Report is 12 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7319      +/-   ##
==========================================
+ Coverage   34.59%   34.60%   +0.01%     
==========================================
  Files        1017     1017              
  Lines       27150    27162      +12     
  Branches     2211     2211              
==========================================
+ Hits         9393     9400       +7     
- Misses      17268    17275       +7     
+ Partials      489      487       -2     
Files Coverage Δ
app/components/UI/TransactionReview/index.js 51.00% <ø> (+1.00%) ⬆️
app/components/UI/TransactionEditor/index.js 2.69% <0.00%> (-0.16%) ⬇️

... and 27 files with indirect coverage changes

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

blackdevelopa
blackdevelopa previously approved these changes Oct 4, 2023
@seaona
Copy link
Contributor

seaona commented Oct 5, 2023

I've started a Bitrise e2e run here, to check if successful when finishes: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/e811b91a-e6f0-4746-85c5-11e77f602fa3

Co-authored-by: Sylva Elendu <iamsylvaelendu@gmail.com>
@sonarcloud
Copy link

sonarcloud bot commented Oct 9, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 1 Code Smell

0.0% 0.0% Coverage
0.0% 0.0% Duplication

@jpuri jpuri merged commit 9a37d5a into main Oct 17, 2023
24 checks passed
@jpuri jpuri deleted the confirmation_error_fix branch October 17, 2023 10:03
@github-actions github-actions bot locked and limited conversation to collaborators Oct 17, 2023
@github-actions github-actions bot removed the needs-dev-review PR needs reviews from other engineers (in order to receive required approvals) label Oct 17, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants