Skip to content

Commit 9262da1

Browse files
release(runway): cherry-pick chore: update notification address icon cp-13.4.0 (#36212)
- chore: update notification address icon cp-13.4.0 (#36210) ## **Description** Updated notification address icon to use user's preferred identicon ## **Changelog** CHANGELOG entry: null ## **Related issues** Fixes: ## **Manual testing steps** Pre-condition: Have a notification on a sent/received transction 1. Click Notification 2. Notification's account icon should match preferred setting ## **Screenshots/Recordings** ### **Before** <img width="102" height="154" alt="image" src="https://github.com/user-attachments/assets/8ee4b403-b5af-4e1a-b9b3-c92e7a824bd7" /> ### **After** <img width="99" height="146" alt="image" src="https://github.com/user-attachments/assets/b2064e04-f037-4195-a902-aaf2939e51ca" /> ## **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 - [x] I’ve included tests if applicable - [x] I’ve documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [x] 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. [6d00231](6d00231) Co-authored-by: Francis Nepomuceno <[email protected]>
1 parent 64b1972 commit 9262da1

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

ui/components/multichain/notification-detail-address/notification-detail-address.test.tsx

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,20 @@
11
import React from 'react';
2-
import { render, screen } from '@testing-library/react';
2+
import { screen } from '@testing-library/react';
3+
import { renderWithProvider } from '../../../../test/lib/render-helpers';
4+
import mockState from '../../../../test/data/mock-state.json';
5+
import configureStore from '../../../store/store';
36
import { NotificationDetailAddress } from './notification-detail-address';
47

8+
const store = configureStore(mockState);
9+
510
describe('NotificationDetailAddress', () => {
611
it('renders without crashing', () => {
7-
render(
12+
renderWithProvider(
813
<NotificationDetailAddress
914
side="From"
1015
address="0x7830c87C02e56AFf27FA8Ab1241711331FA86F43"
1116
/>,
17+
store,
1218
);
1319
expect(screen.getByText('From')).toBeInTheDocument();
1420
});

ui/components/multichain/notification-detail-address/notification-detail-address.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,13 @@ import React from 'react';
22
import type { FC } from 'react';
33
import { NotificationDetail } from '../notification-detail';
44
import { NotificationDetailCopyButton } from '../notification-detail-copy-button';
5-
import { AvatarAccount, Text } from '../../component-library';
5+
import { Text } from '../../component-library';
66
import {
77
FontWeight,
88
TextVariant,
99
} from '../../../helpers/constants/design-system';
1010
import { shortenAddress } from '../../../helpers/utils/util';
11+
import { PreferredAvatar } from '../../app/preferred-avatar';
1112
import { toChecksumHexAddress } from '../../../../shared/modules/hexstring-utils';
1213

1314
export type NotificationDetailAddressProps = {
@@ -38,7 +39,7 @@ export const NotificationDetailAddress: FC<NotificationDetailAddressProps> = ({
3839

3940
return (
4041
<NotificationDetail
41-
icon={<AvatarAccount address={address} />}
42+
icon={<PreferredAvatar address={address} />}
4243
primaryTextLeft={<SideText side={side} />}
4344
secondaryTextLeft={
4445
<NotificationDetailCopyButton

0 commit comments

Comments
 (0)