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

[Bug]: Swap shows incorrect gas fees #28088

Closed
davibroc opened this issue Oct 24, 2024 · 1 comment · Fixed by #28127
Closed

[Bug]: Swap shows incorrect gas fees #28088

davibroc opened this issue Oct 24, 2024 · 1 comment · Fixed by #28127
Assignees
Labels
regression-RC-12.6.0 Regression bug that was found in release candidate (RC) for release 12.6.0 release-12.6.0 Issue or pull request that will be included in release 12.6.0 release-12.7.0 Issue or pull request that will be included in release 12.7.0 Sev1-high High severity; partial loss of service with severe impact upon users, with no workaround. team-confirmations Push issues to confirmations team type-bug

Comments

@davibroc
Copy link
Contributor

davibroc commented Oct 24, 2024

Describe the bug

When testing the "Gas Included Swaps" feature I noticed something odd:
The max gas fee is $1.79, but I am showing a message that I am not allowed to swap as there isn't enough ETH, even though I have $4.49 in ETH, see video below

In production with 12.5, the same operation shows a max fee of $14.56
Note that the gas-included flow was not triggered because the backend update is not live yet.

In the network console I see this call failing with error 400
https://transaction.api.cx.metamask.io/networks/1/getFees
with this response
{
"balance_needed_wei": 3245499634201339,
"current_balance_wei": 1080326071560939,
"error": "not_enough_funds",
"error_details": "'Not enough funds. Balance is only 1080326071560939 wei and we need 3245499634201339 wei at the very least.'"
}

Expected behavior

The UI shows the right gas fees

Screenshots/Recordings

12.5-12.6.mov

Steps to reproduce

See video

Error messages or log output

No response

Detection stage

During release testing

Version

12.6.0

Build type

None

Browser

Chrome

Operating system

MacOS

Hardware wallet

No response

Additional context

No response

Severity

No response

@davibroc davibroc added type-bug team-confirmations Push issues to confirmations team regression-RC-12.5 labels Oct 24, 2024
@github-project-automation github-project-automation bot moved this to To be fixed in Bugs by severity Oct 24, 2024
@github-project-automation github-project-automation bot moved this to To be fixed in Bugs by team Oct 24, 2024
@metamaskbot metamaskbot added regression-RC-12.6.0 Regression bug that was found in release candidate (RC) for release 12.6.0 and removed regression-RC-12.5 labels Oct 24, 2024
@davibroc davibroc added Sev1-high High severity; partial loss of service with severe impact upon users, with no workaround. regression-RC-12.5 regression-RC-12.6.0 Regression bug that was found in release candidate (RC) for release 12.6.0 and removed regression-RC-12.6.0 Regression bug that was found in release candidate (RC) for release 12.6.0 regression-RC-12.5 labels Oct 24, 2024
github-merge-queue bot pushed a commit that referenced this issue Oct 29, 2024
## **Description**

Fix incorrect non-smart gas fee estimations due to the use of an empty
estimated base fee.

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

## **Related issues**

Fixes: #28088 

## **Manual testing steps**

See issue.

## **Screenshots/Recordings**

### **Before**

### **After**

<img width="354" alt="Smart"
src="https://github.com/user-attachments/assets/c1c604d3-9b03-4e4f-b819-9c21f230f789">

<img width="353" alt="Standard"
src="https://github.com/user-attachments/assets/47acd4d1-c618-4d61-afdc-65ce827454a2">

## **Pre-merge author checklist**

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

## **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.
@github-project-automation github-project-automation bot moved this from To be fixed to Fixed in Bugs by severity Oct 29, 2024
@github-project-automation github-project-automation bot moved this from To be fixed to Fixed in Bugs by team Oct 29, 2024
@metamaskbot metamaskbot added the release-12.7.0 Issue or pull request that will be included in release 12.7.0 label Oct 29, 2024
matthewwalsh0 added a commit that referenced this issue Oct 30, 2024
## **Description**

Fix incorrect non-smart gas fee estimations due to the use of an empty
estimated base fee.

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

## **Related issues**

Fixes: #28088 

## **Manual testing steps**

See issue.

## **Screenshots/Recordings**

### **Before**

### **After**

<img width="354" alt="Smart"
src="https://github.com/user-attachments/assets/c1c604d3-9b03-4e4f-b819-9c21f230f789">

<img width="353" alt="Standard"
src="https://github.com/user-attachments/assets/47acd4d1-c618-4d61-afdc-65ce827454a2">

## **Pre-merge author checklist**

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

## **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.
@metamaskbot metamaskbot added the release-12.6.0 Issue or pull request that will be included in release 12.6.0 label Oct 31, 2024
@metamaskbot
Copy link
Collaborator

Missing release label release-12.6.0 on issue. Adding release label release-12.6.0 on issue, as issue is linked to PR #28127 which has this release label.

@vpintorico vpintorico added the release-blocker This bug is blocking the next release label Nov 13, 2024
@github-project-automation github-project-automation bot moved this to To be fixed in Bugs by team Nov 13, 2024
@vpintorico vpintorico removed the release-blocker This bug is blocking the next release label Nov 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
regression-RC-12.6.0 Regression bug that was found in release candidate (RC) for release 12.6.0 release-12.6.0 Issue or pull request that will be included in release 12.6.0 release-12.7.0 Issue or pull request that will be included in release 12.7.0 Sev1-high High severity; partial loss of service with severe impact upon users, with no workaround. team-confirmations Push issues to confirmations team type-bug
Projects
Archived in project
Status: To be fixed
Development

Successfully merging a pull request may close this issue.

5 participants
@vpintorico @davibroc @matthewwalsh0 @metamaskbot and others