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: Permit DataTree token decimals #27328

Merged
merged 4 commits into from
Sep 26, 2024
Merged

Conversation

digiwand
Copy link
Contributor

@digiwand digiwand commented Sep 23, 2024

Description

When no token detail decimals are found in the DataTree showing an amount, we should use the verifiedContract token details passed from TypedSignInfo component. This PR applies this and adds an "Incomplete Asset Displayed" when getTokenStandardAndDetails fails to return details of a token.

also adds support for passing null decimals to fetchErc20Decimals

Open in GitHub Codespaces

Related issues

Fixes: #27243

Manual testing steps

  1. Go to test-dapp
  2. Test Permit

Screenshots/Recordings

Before

After

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.

@digiwand digiwand added the team-confirmations Push issues to confirmations team label Sep 23, 2024
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.

Copy link

@digiwand digiwand marked this pull request as ready for review September 23, 2024 12:51
@digiwand digiwand requested review from a team as code owners September 23, 2024 12:51
@metamaskbot
Copy link
Collaborator

Builds ready [e27787c]
Page Load Metrics (1837 ± 69 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint16532300183714770
domContentLoaded16412292181114771
load16542301183714569
domInteractive16163563215
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 0 Bytes (0.00%)
  • ui: -65 Bytes (-0.00%)
  • common: 1 Bytes (0.00%)

Copy link
Contributor

@pedronfigueiredo pedronfigueiredo left a comment

Choose a reason for hiding this comment

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

LGTM, left one comment

shared/lib/transactions-controller-utils.js Show resolved Hide resolved
@digiwand digiwand requested a review from jpuri September 25, 2024 08:30
@digiwand digiwand merged commit 77176e0 into develop Sep 26, 2024
86 checks passed
@digiwand digiwand deleted the fix-data-tree-token-decimals branch September 26, 2024 10:09
@github-actions github-actions bot locked and limited conversation to collaborators Sep 26, 2024
@metamaskbot metamaskbot added the release-12.6.0 Issue or pull request that will be included in release 12.6.0 label Sep 26, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
release-12.6.0 Issue or pull request that will be included in release 12.6.0 team-confirmations Push issues to confirmations team type-bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Fix Permit token decimal amounts
4 participants