Skip to content

Commit af0e017

Browse files
fix: remove non-existent round prop from IconButton (#35537)
## **Description** This PR fixes a React warning by removing the non-existent `round` prop from IconButton components in the CoinButtons component. The `round` prop was being passed with a boolean value `false` to IconButton components that don't support this attribute, causing console warnings. The changes remove the `round={!displayNewIconButtons}` prop from all IconButton instances in the coin-buttons.tsx file. ## **Changelog** CHANGELOG entry: null ## **Related issues** Fixes console warnings for non-boolean attribute `round` in coin buttons. ## **Manual testing steps** 1. Open the MetaMask extension 2. Navigate to the wallet overview page where coin buttons are displayed 3. Open browser dev tools and check console 4. Verify no warnings about non-existent `round` prop are displayed 5. Verify coin buttons still function correctly (Buy, Swap, Bridge, Send, Receive) ## **Screenshots/Recordings** N/A - This is a console warning fix with no visual changes. ### Before <img width="1504" height="865" alt="Screenshot 2025-08-29 at 1 43 07 PM" src="https://github.com/user-attachments/assets/2f145263-9115-47c2-b13c-e75f637096fd" /> ### After <img width="1510" height="863" alt="Screenshot 2025-08-29 at 1 47 28 PM" src="https://github.com/user-attachments/assets/d251b559-63eb-429a-9d90-eb1bdef3c237" /> ## **Pre-merge author checklist** - [x] 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). - [x] I've completed the PR template to the best of my ability - [ ] I've included tests if applicable - [x] 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. 🤖 Generated with [Claude Code](https://claude.ai/code)
1 parent 07b3e53 commit af0e017

2 files changed

Lines changed: 0 additions & 6 deletions

File tree

ui/components/app/wallet-overview/coin-buttons.tsx

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -439,7 +439,6 @@ const CoinButtons = ({
439439
tooltipRender={(contents: React.ReactElement) =>
440440
generateTooltip('buyButton', contents)
441441
}
442-
round={!displayNewIconButtons}
443442
/>
444443
}
445444
<IconButton
@@ -471,7 +470,6 @@ const CoinButtons = ({
471470
tooltipRender={(contents: React.ReactElement) =>
472471
generateTooltip('swapButton', contents)
473472
}
474-
round={!displayNewIconButtons}
475473
/>
476474
{/* the bridge button is redundant if unified ui is enabled, testnet or non-bridge chain (unsupported) */}
477475
{isUnifiedUIEnabled ||
@@ -507,7 +505,6 @@ const CoinButtons = ({
507505
tooltipRender={(contents: React.ReactElement) =>
508506
generateTooltip('bridgeButton', contents)
509507
}
510-
round={!displayNewIconButtons}
511508
/>
512509
)}
513510
<IconButton
@@ -535,7 +532,6 @@ const CoinButtons = ({
535532
tooltipRender={(contents: React.ReactElement) =>
536533
generateTooltip('sendButton', contents)
537534
}
538-
round={!displayNewIconButtons}
539535
/>
540536
{
541537
<>
@@ -566,7 +562,6 @@ const CoinButtons = ({
566562
label={t('receive')}
567563
width={BlockSize.Full}
568564
onClick={handleReceiveOnClick}
569-
round={!displayNewIconButtons}
570565
/>
571566
</>
572567
}

ui/components/ui/icon-button/icon-button.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ export type IconButtonProps = ButtonBaseProps<'button'> & {
2020
label: string;
2121
className?: string;
2222
tooltipRender?: (content: React.ReactElement) => React.ReactElement;
23-
round?: boolean;
2423
};
2524

2625
const IconButton = forwardRef<HTMLButtonElement, IconButtonProps>(

0 commit comments

Comments
 (0)