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

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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
3 participants