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/linea bufix 12.5 #27876

Merged
merged 1 commit into from
Oct 15, 2024
Merged

Fix/linea bufix 12.5 #27876

merged 1 commit into from
Oct 15, 2024

Conversation

martahj
Copy link
Contributor

@martahj martahj commented Oct 15, 2024

Description

Cherry-pick of #27810 into 12.5.0.

Open in GitHub Codespaces

Related issues

Fixes: #27804

Manual testing steps

  1. Start a swap on Linea with a token that you have not granted approval for
  2. Observe that the swap does not fail

Screenshots/Recordings

Before

375871389-343ab5ee-1bcb-45cb-9d42-c753b80c1fea.mov

After

LineaSwap.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.

…e of success (#27810)

Linea seems to be taking longer than other chains to process the approve
transaction after it is submitted, so the trade transaction is erroring.
This PR adds a hacky workaround where we artificially delay if we're on
Linea to give the trade transaction more time. In the future, we'd want
to avoid this hack, but for now it should increase the swap success rate
on Linea.

With the delay, the token symbol also wasn't immediately populating on
the awaiting swap page, so this PR also updates how it's retrieved.

[![Open in GitHub
Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/27810?quickstart=1)

Fixes: #27804

1. Start a swap on Linea with a token that you have not granted approval
for
2. Observe that the swap does not fail

https://github.com/user-attachments/assets/57cdc5e5-cea7-48ad-ba13-38820ecc9155

https://github.com/user-attachments/assets/91bbfbf4-8392-41ea-bfe8-d54813758f5c

- [X] 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).
- [X] I've completed the PR template to the best of my ability
- [X] I’ve included tests if applicable
- [X] I’ve documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [X] 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.
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.

@martahj martahj changed the base branch from develop to Version-v12.5.0 October 15, 2024 18:00
Copy link
Contributor

@davibroc davibroc left a comment

Choose a reason for hiding this comment

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

I have tested and it works now

@metamaskbot
Copy link
Collaborator

Builds ready [f8a6d68]
Page Load Metrics (1813 ± 36 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint29219011650453218
domContentLoaded1658195617897235
load1666196118137436
domInteractive278545178

@martahj martahj marked this pull request as ready for review October 15, 2024 20:28
@martahj martahj requested review from a team as code owners October 15, 2024 20:28
@martahj martahj merged commit 1a65ee7 into Version-v12.5.0 Oct 15, 2024
64 of 65 checks passed
@martahj martahj deleted the fix/linea-bufix-12.5 branch October 15, 2024 22:36
@github-actions github-actions bot locked and limited conversation to collaborators Oct 15, 2024
@metamaskbot metamaskbot added the release-12.5.0 Issue or pull request that will be included in release 12.5.0 label Oct 21, 2024
@metamaskbot
Copy link
Collaborator

No release label on PR. Adding release label release-12.5.0 on PR, as PR was added to branch 12.5.0 when release was cut.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
QA Passed release-12.5.0 Issue or pull request that will be included in release 12.5.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Swap of unapproved token fails on Linea
5 participants