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]: [Bug]: When the transaction amount exceeds available funds, no warning is displayed to alert the user, Max amount is not adjusted in response to gas fees changes #29903

Closed
sleepytanya opened this issue Jan 25, 2025 · 1 comment · Fixed by #29960
Assignees
Labels
regression-RC-12.11.0 Regression bug that was found in release candidate (RC) for release 12.11.0 release-12.12.0 Issue or pull request that will be included in release 12.12.0 release-blocker This bug is blocking the next release Sev2-normal Normal severity; minor loss of service or inconvenience. team-confirmations Push issues to confirmations team type-bug Something isn't working

Comments

@sleepytanya
Copy link
Contributor

sleepytanya commented Jan 25, 2025

Describe the bug

Currently, when opting to send the maximum amount, if there are changes in gas fees—either through manual adjustments in Settings or due to fluctuations in gas prices—the amount designated to be sent does not automatically adjust to reflect these gas fee changes. Consequently, if the combined total of the gas fees and the amount exceeds the available funds in the account, no notification or message is displayed on the Confirmation screen to alert the user.

When a user clicks on a transaction that has failed, the message displayed inaccurately suggests that proceeding with this transaction could incur additional fees. However, the actual reason for the failure is insufficient funds.

The "Insufficient funds" warning is exclusively displayed on the Gas Settings screen, and only if the user opts to return to these settings for a second review after their initial adjustments have been saved:

Image

Expected behavior

When opting to send the maximum amount, the specified amount should automatically adjust in response to any changes in gas fees.
The correct message about insufficient funds should be displayed.

Screenshots/Recordings

When tx fails on mainnet console errors suggest that it is due to the insufficient funds, on other networks it's Internal JSON-RPC error:

Image Image
12_11.mov
Screen.Recording.2025-01-24.at.19.24.50.mov

Steps to reproduce

  1. Start Send transaction
  2. Select Max amount
  3. Adjust gas fees using Gas Settings or wait until gas price gets higher
  4. Submit transaction

Error messages or log output

Detection stage

During release testing

Version

12.11.0

Build type

None

Browser

Chrome

Operating system

MacOS

Hardware wallet

No response

Additional context

No response

Severity

No response

@sleepytanya sleepytanya added regression-RC-12.11.0 Regression bug that was found in release candidate (RC) for release 12.11.0 release-blocker This bug is blocking the next release Sev2-normal Normal severity; minor loss of service or inconvenience. team-confirmations Push issues to confirmations team type-bug Something isn't working labels Jan 25, 2025
@github-project-automation github-project-automation bot moved this to To be fixed in Bugs by team Jan 25, 2025
@github-project-automation github-project-automation bot moved this to To be fixed in Bugs by severity Jan 25, 2025
@sleepytanya sleepytanya changed the title [Bug]: [Bug]: When the transaction amount exceeds available funds, no warning is displayed to alert the user [Bug]: [Bug]: When the transaction amount exceeds available funds, no warning is displayed to alert the user, Max amount is not adjusted in response to gas fees changes Jan 25, 2025
@OGPoyraz OGPoyraz linked a pull request Jan 29, 2025 that will close this issue
7 tasks
github-merge-queue bot pushed a commit that referenced this issue Jan 29, 2025
<!--
Please submit this PR as a draft initially.
Do not mark it as "Ready for review" until the template has been
completely filled out, and PR status checks have passed at least once.
-->

## **Description**

<!--
Write a short description of the changes included in this pull request,
also include relevant motivation and context. Have in mind the following
questions:
1. What is the reason for the change?
2. What is the improvement/solution?
-->

This PR aims to fix send max value issue for redesigned confirmations.

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

## **Related issues**

Fixes: #29903

## **Manual testing steps**

1. Initiate a native send flow from wallet
2. Click max in the amount picker
3. Go to next step (confirmation)
4. See that value changes when gas is changed

## **Screenshots/Recordings**

<!-- If applicable, add screenshots and/or recordings to visualize the
before and after of your change. -->



https://github.com/user-attachments/assets/14a85e29-b7d5-4bfe-b013-25f1954103cc



### **Before**

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

### **After**

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

## **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/main/.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/main/.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-merge-queue bot pushed a commit that referenced this issue Jan 29, 2025
<!--
Please submit this PR as a draft initially.
Do not mark it as "Ready for review" until the template has been
completely filled out, and PR status checks have passed at least once.
-->

## **Description**

<!--
Write a short description of the changes included in this pull request,
also include relevant motivation and context. Have in mind the following
questions:
1. What is the reason for the change?
2. What is the improvement/solution?
-->

This PR aims to fix send max value issue for redesigned confirmations.

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

## **Related issues**

Fixes: #29903

## **Manual testing steps**

1. Initiate a native send flow from wallet
2. Click max in the amount picker
3. Go to next step (confirmation)
4. See that value changes when gas is changed

## **Screenshots/Recordings**

<!-- If applicable, add screenshots and/or recordings to visualize the
before and after of your change. -->



https://github.com/user-attachments/assets/14a85e29-b7d5-4bfe-b013-25f1954103cc



### **Before**

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

### **After**

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

## **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/main/.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/main/.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.

---------

Co-authored-by: Harika <[email protected]>
@github-project-automation github-project-automation bot moved this from To be fixed to Fixed in Bugs by team Jan 29, 2025
@metamaskbot metamaskbot added the release-12.12.0 Issue or pull request that will be included in release 12.12.0 label Jan 30, 2025
OGPoyraz added a commit that referenced this issue Jan 30, 2025
<!--
Please submit this PR as a draft initially.
Do not mark it as "Ready for review" until the template has been
completely filled out, and PR status checks have passed at least once.
-->

<!--
Write a short description of the changes included in this pull request,
also include relevant motivation and context. Have in mind the following
questions:
1. What is the reason for the change?
2. What is the improvement/solution?
-->

This PR aims to fix send max value issue for redesigned confirmations.

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

Fixes: #29903

1. Initiate a native send flow from wallet
2. Click max in the amount picker
3. Go to next step (confirmation)
4. See that value changes when gas is changed

<!-- If applicable, add screenshots and/or recordings to visualize the
before and after of your change. -->

https://github.com/user-attachments/assets/14a85e29-b7d5-4bfe-b013-25f1954103cc

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

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

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

---------

Co-authored-by: Harika <[email protected]>
dbrans pushed a commit that referenced this issue Jan 30, 2025
<!--
Please submit this PR as a draft initially.
Do not mark it as "Ready for review" until the template has been
completely filled out, and PR status checks have passed at least once.
-->

## **Description**

<!--
Write a short description of the changes included in this pull request,
also include relevant motivation and context. Have in mind the following
questions:
1. What is the reason for the change?
2. What is the improvement/solution?
-->

This PR cherry-picks
#29903

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

## **Related issues**

Fixes: #29903
Cherry-pick: #29960

## **Manual testing steps**

See original issue
#29903

## **Screenshots/Recordings**

<!-- If applicable, add screenshots and/or recordings to visualize the
before and after of your change. -->

### **Before**

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

### **After**

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

## **Pre-merge author checklist**

- [ ] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask
Extension Coding
Standards](https://github.com/MetaMask/metamask-extension/blob/main/.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/main/.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.

Co-authored-by: Harika <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
regression-RC-12.11.0 Regression bug that was found in release candidate (RC) for release 12.11.0 release-12.12.0 Issue or pull request that will be included in release 12.12.0 release-blocker This bug is blocking the next release Sev2-normal Normal severity; minor loss of service or inconvenience. team-confirmations Push issues to confirmations team type-bug Something isn't working
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

4 participants
@OGPoyraz @metamaskbot @sleepytanya and others