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: cp-7.41.0 Temporarily revert gas included swaps #13639

Merged
merged 1 commit into from
Feb 21, 2025

Conversation

dan437
Copy link
Contributor

@dan437 dan437 commented Feb 20, 2025

Description

Reverts #13430 for now.

We initially believed that resolving the known issue with gas-included swaps requiring token approval would be easy and could be completed before the release candidate for version 7.41.0 was pushed to production, but it turns out that more fundamental changes are needed. Specifically, submitBatch support from the TransactionController—allowing the simultaneous submission of multiple transactions (approval and swap)—is required. This submitBatch support will likely also be used for current swaps that need token approval to increase success rates.

EDIT: there is an alternative short-term solution that the Swaps team is working on to fix approval + swap on mobile. Once that one is merged, this code should work.

Related issues

Fixes: #13584

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.

@dan437 dan437 requested review from a team as code owners February 20, 2025 15:19
@dan437 dan437 added the regression-RC-7.41.0 Regression bug that was found in release candidate (RC) for release 7.41.0 label Feb 20, 2025
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.

@metamaskbot metamaskbot added the team-transactions Transactions team label Feb 20, 2025
@dan437 dan437 added the Run Smoke E2E Triggers smoke e2e on Bitrise label Feb 20, 2025
Copy link
Contributor

github-actions bot commented Feb 20, 2025

https://bitrise.io/ Bitrise

❌❌❌ pr_smoke_e2e_pipeline failed on Bitrise! ❌❌❌

Commit hash: a99b1a3
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/e072a905-cac3-4c08-beee-da930d0913c4

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

@dan437 dan437 changed the title fix: Temporarily revert gas included swaps fix: cp-7.41.0 Temporarily revert gas included swaps Feb 20, 2025
@dan437 dan437 added No QA Needed Apply this label when your PR does not need any QA effort. skip-sonar-cloud Only used for bypassing sonar cloud when failures are not relevant to the changes. and removed Run Smoke E2E Triggers smoke e2e on Bitrise labels Feb 20, 2025
@dan437 dan437 force-pushed the revert-gas-included-swaps branch from a99b1a3 to aa73a46 Compare February 20, 2025 15:51
@dan437 dan437 added the No E2E Smoke Needed If the PR does not need E2E smoke test run label Feb 20, 2025
@dan437 dan437 force-pushed the revert-gas-included-swaps branch from aa73a46 to 1861de0 Compare February 20, 2025 17:10
infiniteflower
infiniteflower previously approved these changes Feb 20, 2025
@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 40.00000% with 6 lines in your changes missing coverage. Please review.

Project coverage is 62.72%. Comparing base (07d05d7) to head (30b922a).

Files with missing lines Patch % Lines
app/components/UI/Swaps/QuotesView.js 16.66% 5 Missing ⚠️
app/core/Engine/Engine.ts 0.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main   #13639   +/-   ##
=======================================
  Coverage   62.72%   62.72%           
=======================================
  Files        2025     2025           
  Lines       44474    44431   -43     
  Branches     6044     6041    -3     
=======================================
- Hits        27897    27871   -26     
+ Misses      14736    14719   -17     
  Partials     1841     1841           

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

@httpJunkie httpJunkie self-requested a review February 21, 2025 14:10
Copy link
Contributor

@httpJunkie httpJunkie left a comment

Choose a reason for hiding this comment

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

revert of changes from #13430, checked against that PR and everything looks good.

@dan437 dan437 force-pushed the revert-gas-included-swaps branch from 30b922a to 692305a Compare February 21, 2025 14:19
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
41.7% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

@dan437 dan437 added this pull request to the merge queue Feb 21, 2025
Merged via the queue into main with commit 7f31286 Feb 21, 2025
42 of 43 checks passed
@dan437 dan437 deleted the revert-gas-included-swaps branch February 21, 2025 17:09
@github-actions github-actions bot locked and limited conversation to collaborators Feb 21, 2025
@metamaskbot metamaskbot added the release-7.42.0 Issue or pull request that will be included in release 7.42.0 label Feb 21, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
No E2E Smoke Needed If the PR does not need E2E smoke test run No QA Needed Apply this label when your PR does not need any QA effort. regression-RC-7.41.0 Regression bug that was found in release candidate (RC) for release 7.41.0 release-7.42.0 Issue or pull request that will be included in release 7.42.0 skip-sonar-cloud Only used for bypassing sonar cloud when failures are not relevant to the changes. team-transactions Transactions team
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

[Bug]: Resolve a known issue with gas included swaps that require a token approval
6 participants