From 26f7c5adffb1b30d9d896f262bd2818abc299d1e Mon Sep 17 00:00:00 2001 From: Brian Bergeron Date: Wed, 18 Dec 2024 00:54:12 -0800 Subject: [PATCH] fix: 'Metamask' casing on token details page (#29250) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## **Description** Fixes the casing of 'Metamask' to 'MetaMask' on the token details page. [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/29250?quickstart=1) ## **Related issues** Fixes: https://consensyssoftware.atlassian.net/browse/MMASSETS-399 ## **Manual testing steps** 1. Click on an erc20 token 2. Verify token lists section uses casing 'MetaMask' ## **Screenshots/Recordings** ### **Before** Screenshot 2024-12-16 at 1 27 31 PM ### **After** Screenshot 2024-12-16 at 1 27 09 PM ## **Pre-merge author checklist** - [ ] 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). - [ ] I've completed the PR template to the best of my ability - [ ] I’ve included tests if applicable - [ ] I’ve documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [ ] 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** - [ ] 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. --- ui/pages/asset/components/asset-page.tsx | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/ui/pages/asset/components/asset-page.tsx b/ui/pages/asset/components/asset-page.tsx index 79cf2510f015..aef098bfd9d2 100644 --- a/ui/pages/asset/components/asset-page.tsx +++ b/ui/pages/asset/components/asset-page.tsx @@ -75,7 +75,7 @@ export type Asset = ( /** The number of decimal places to move left when displaying balances */ decimals: number; /** An array of token list sources the asset appears in, e.g. [1inch,Sushiswap] */ - aggregators?: []; + aggregators?: string[]; } ) & { /** The hexadecimal chain id */ @@ -332,7 +332,13 @@ const AssetPage = ({ > {t('tokenList')} - {asset.aggregators.join(', ')} + + {asset.aggregators + .map((agg) => + agg.replace(/^metamask$/iu, 'MetaMask'), + ) + .join(', ')} + )}