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]: Send Alert - Insufficient funds displays incorrect native token as copy text and button text #28867

Open
seaona opened this issue Dec 3, 2024 · 1 comment · Fixed by #30009
Labels
regression-prod-12.8.0 Regression bug that was found in production in release 12.8.0 Sev2-normal Normal severity; minor loss of service or inconvenience. team-assets type-bug

Comments

@seaona
Copy link
Contributor

seaona commented Dec 3, 2024

Describe the bug

Whenever we are on a network if a different native token than ETH, we can see how if we trigger a tx with an account without funds, we get the Insufficient funds alert, with incorrect token (ie. in Polygon, instead of displaying POL we see ETH in both the text and the button)

Expected behavior

The Alert and button should display the native token for each network

Screenshots/Recordings

alert-incorrect-token-name.mp4

Steps to reproduce

  1. Select Polygon
  2. Trigger a dapp tx with an account without funds
  3. Click on the Alert
  4. See ETH as the token name

Error messages or log output

No response

Detection stage

In production (default)

Version

12.8.0

Build type

None

Browser

Chrome, Firefox

Operating system

Linux

Hardware wallet

No response

Additional context

No response

Severity

No response

@seaona seaona added type-bug Sev2-normal Normal severity; minor loss of service or inconvenience. team-assets labels Dec 3, 2024
@github-project-automation github-project-automation bot moved this to To be fixed in Bugs by severity Dec 3, 2024
@github-project-automation github-project-automation bot moved this to To be fixed in Bugs by team Dec 3, 2024
@metamaskbot metamaskbot added the regression-prod-12.8.0 Regression bug that was found in production in release 12.8.0 label Dec 3, 2024
@matteoscurati
Copy link
Contributor

hey @seaona I started to draft a PR to fix this issue here #29828

github-merge-queue bot 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**

This PR addresses an issue where the "Insufficient funds" alert
incorrectly displayed "ETH" as the native token, regardless of the
actual network's native token
#28867. This was
observed when users attempted to initiate a transaction on networks with
a different native token, such as Polygon, where "POL" should be
displayed instead of "ETH".

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

## **Related issues**

#28867

## **Manual testing steps**

1. Select Polygon
2. Trigger a dapp tx with an account without funds (you can use these
tests https://metamask.github.io/test-dapp/)
3. Click on the Alert
4. See POL as the token name

## **Screenshots/Recordings**

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

### **Before**

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

### **After**

https://www.loom.com/share/8dd8001fc8d44da3b77e52a4877427f8

## **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**

- [x] I've manually tested the PR (e.g. pull and build branch, run the
app, test code being changed).
- [x] 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.
matteoscurati 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.
-->

## **Description**

This PR addresses an issue where the "Insufficient funds" alert
incorrectly displayed "ETH" as the native token, regardless of the
actual network's native token
#28867. This was
observed when users attempted to initiate a transaction on networks with
a different native token, such as Polygon, where "POL" should be
displayed instead of "ETH".

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

## **Related issues**

#28867

## **Manual testing steps**

1. Select Polygon
2. Trigger a dapp tx with an account without funds (you can use these
tests https://metamask.github.io/test-dapp/)
3. Click on the Alert
4. See POL as the token name

## **Screenshots/Recordings**

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

### **Before**

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

### **After**

https://www.loom.com/share/8dd8001fc8d44da3b77e52a4877427f8

## **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**

- [x] I've manually tested the PR (e.g. pull and build branch, run the
app, test code being changed).
- [x] 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.
@dbrans dbrans linked a pull request Jan 30, 2025 that will close this issue
7 tasks
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**

This PR addresses an issue where the "Insufficient funds" alert
incorrectly displayed "ETH" as the native token, regardless of the
actual network's native token
#28867. This was
observed when users attempted to initiate a transaction on networks with
a different native token, such as Polygon, where "POL" should be
displayed instead of "ETH".

[![Open in GitHub

Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/29828?quickstart=1)

## **Related issues**

Fixes: #28867

## **Manual testing steps**

1. Select Polygon
2. Trigger a dapp tx with an account without funds (you can use these
tests https://metamask.github.io/test-dapp/)
3. Click on the Alert
4. See POL as the token name

## **Screenshots/Recordings**

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

### **Before**

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

### **After**

https://www.loom.com/share/8dd8001fc8d44da3b77e52a4877427f8

## **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**

- [x] I've manually tested the PR (e.g. pull and build branch, run the
app, test code being changed).
- [x] 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
regression-prod-12.8.0 Regression bug that was found in production in release 12.8.0 Sev2-normal Normal severity; minor loss of service or inconvenience. team-assets type-bug
Projects
Status: To be fixed
Status: To be fixed
Development

Successfully merging a pull request may close this issue.

3 participants