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: Transaction Details view shows inaccurate balance on Mobile #8328

Merged
merged 2 commits into from
Jan 19, 2024

Conversation

salimtb
Copy link
Contributor

@salimtb salimtb commented Jan 18, 2024

Description

users have discrepancy in the USDT token balance on his tx insight page in the MM app, they are seeing 33.22 USDT but it should be 5.43 USDT ( see the pictures below )

the problem is due to the fact that we use a hexadecimal value to create a big number object, whereas the function balanceToFiat expects a decimal value. to calculate the conversion fiat

Related issues

Fixes: #7787

Manual testing steps

  1. Go to the main page of the app and click on your USDT token.
  2. scroll down and click on "Received USDT"
  3. check the amount section

Screenshots/Recordings

Before

https://drive.google.com/file/d/1766q37UBdndVqk0cNG8eVCBf-mCsCm2j/view?usp=sharing

After

https://drive.google.com/file/d/1l_sC7CK67WbjQmtLpbFUqiqj4iie2Fqv/view?usp=sharing

Pre-merge author checklist

  • I’ve followed MetaMask Coding Standards.
  • I've clearly explained what problem this PR is solving and how it is solved.
  • I've linked related issues
  • I've included manual testing steps
  • I've included screenshots/recordings if applicable
  • I’ve included tests if applicable
  • I’ve documented my code using JSDoc format if applicable
  • I’ve applied the right labels on the PR (see labeling guidelines). Not required for external contributors.
  • I’ve properly set the pull request status:
    • In case it's not yet "ready for review", I've set it to "draft".
    • In case it's "ready for review", I've changed it from "draft" to "non-draft".

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.

@salimtb salimtb requested a review from a team as a code owner January 18, 2024 12:48
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.

@salimtb salimtb added needs-dev-review PR needs reviews from other engineers (in order to receive required approvals) team-assets team-mobile-ux DEPRECATED: please use "team-wallet-ux" label instead labels Jan 18, 2024
Copy link
Contributor

E2E test started on Bitrise: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/a95cd78b-a42c-4fa5-ab99-ccd2f9d0eeeb
You can also kick off another Bitrise E2E smoke test by removing and re-applying the (Run Smoke E2E) label

@tommasini
Copy link
Contributor

Is there an issue already created on github that we can link for this bug?

@salimtb
Copy link
Contributor Author

salimtb commented Jan 18, 2024

Is there an issue already created on github that we can link for this bug?

hey @tommasini ,
you can find here the github issue link

@tommasini

This comment was marked as resolved.

@salimtb

This comment was marked as resolved.

tommasini

This comment was marked as resolved.

Copy link
Contributor

E2E test started on Bitrise: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/8ab2e482-8050-44c8-ad52-fe215975de3f
You can also kick off another Bitrise E2E smoke test by removing and re-applying the (Run Smoke E2E) label

Copy link

sonarcloud bot commented Jan 18, 2024

Quality Gate Passed Quality Gate passed

The SonarCloud Quality Gate passed, but some issues were introduced.

1 New issue
0 Security Hotspots
100.0% Coverage on New Code
20.0% Duplication on New Code

See analysis details on SonarCloud

Copy link
Contributor

@tommasini tommasini left a comment

Choose a reason for hiding this comment

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

lGTM

@salimtb salimtb merged commit 4e2a83f into main Jan 19, 2024
31 checks passed
@salimtb salimtb deleted the fix/inacurate-balance-shown branch January 19, 2024 10:09
@github-actions github-actions bot locked and limited conversation to collaborators Jan 19, 2024
@github-actions github-actions bot removed the needs-dev-review PR needs reviews from other engineers (in order to receive required approvals) label Jan 19, 2024
@metamaskbot metamaskbot added the release-7.16.0 Issue or pull request that will be included in release 7.16.0 label Jan 19, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
release-7.16.0 Issue or pull request that will be included in release 7.16.0 team-assets team-mobile-ux DEPRECATED: please use "team-wallet-ux" label instead
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Transaction Details view shows inaccurate balance
4 participants