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: Fall back to token list for the token symbol #28003

Merged
merged 1 commit into from
Oct 24, 2024
Merged

Conversation

pedronfigueiredo
Copy link
Contributor

@pedronfigueiredo pedronfigueiredo commented Oct 22, 2024

Description

Open in GitHub Codespaces

Related issues

Fixes: #27970

Manual testing steps

  1. Go to this page...

Screenshots/Recordings

Before

After

Screenshot 2024-10-22 at 11 19 10

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.

@pedronfigueiredo pedronfigueiredo added the team-confirmations Push issues to confirmations team label Oct 22, 2024
@pedronfigueiredo pedronfigueiredo self-assigned this Oct 22, 2024
@pedronfigueiredo pedronfigueiredo requested a review from a team as a code owner October 22, 2024 10:20
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.

@metamaskbot
Copy link
Collaborator

Builds ready [37a22d4]
Page Load Metrics (1909 ± 119 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint29728031834420202
domContentLoaded16702464185516680
load168128601909248119
domInteractive27232594823
backgroundConnect8356588440
firstReactRender482111114522
getState5163234120
initialActions01000
loadScripts11801837137313766
setupStore12129523517
uiStartup188437412228430206
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 131 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

return { tokenImage };
const tokenSymbol =
selectedToken?.symbol ||
tokenList[transactionMeta?.txParams?.to as string]?.symbol ||
Copy link
Member

Choose a reason for hiding this comment

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

Minor, worth extracting the to into a contractAddress variable?

transactionMeta: TransactionMeta,
selectedToken: SelectedToken,
) => {
const t = useI18nContext();

const tokenList = useSelector(getTokenList) as TokenListMap;
Copy link
Member

Choose a reason for hiding this comment

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

One for future note but getTokenList is derived from the global network where as I just added a selector to use tokensChainsCache which is multi-chain compatible as it's a map of data per chain.

@metamaskbot
Copy link
Collaborator

Builds ready [c679deb]
Page Load Metrics (2682 ± 647 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint591550020981154554
domContentLoaded1619544326471337642
load1651549026821347647
domInteractive28239855727
backgroundConnect997392612
firstReactRender5862816512460
getState487232613
initialActions01000
loadScripts1184430520001027493
setupStore1191332612
uiStartup1822677630271553746

@pedronfigueiredo pedronfigueiredo added this pull request to the merge queue Oct 24, 2024
Merged via the queue into develop with commit 4e25617 Oct 24, 2024
76 checks passed
@pedronfigueiredo pedronfigueiredo deleted the pnf/27970 branch October 24, 2024 09:57
@github-actions github-actions bot locked and limited conversation to collaborators Oct 24, 2024
@metamaskbot metamaskbot added release-12.7.0 Issue or pull request that will be included in release 12.7.0 release-12.6.0 Issue or pull request that will be included in release 12.6.0 and removed release-12.7.0 Issue or pull request that will be included in release 12.7.0 labels Oct 24, 2024
@metamaskbot
Copy link
Collaborator

Missing release label release-12.6.0 on PR. Adding release label release-12.6.0 on PR and removing other release labels(release-12.7.0), as PR was cherry-picked in branch 12.6.0.

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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Known token being displayed as unknown on the redesigned erc20 transfer
4 participants