Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,14 +1,20 @@
import React from 'react';
import { render, screen } from '@testing-library/react';
import { screen } from '@testing-library/react';
import { renderWithProvider } from '../../../../test/lib/render-helpers';
import mockState from '../../../../test/data/mock-state.json';
import configureStore from '../../../store/store';
import { NotificationDetailAddress } from './notification-detail-address';

const store = configureStore(mockState);

describe('NotificationDetailAddress', () => {
it('renders without crashing', () => {
render(
renderWithProvider(
<NotificationDetailAddress
side="From"
address="0x7830c87C02e56AFf27FA8Ab1241711331FA86F43"
/>,
store,
);
expect(screen.getByText('From')).toBeInTheDocument();
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@ import React from 'react';
import type { FC } from 'react';
import { NotificationDetail } from '../notification-detail';
import { NotificationDetailCopyButton } from '../notification-detail-copy-button';
import { AvatarAccount, Text } from '../../component-library';
import { Text } from '../../component-library';
import {
FontWeight,
TextVariant,
} from '../../../helpers/constants/design-system';
import { shortenAddress } from '../../../helpers/utils/util';
import { PreferredAvatar } from '../../app/preferred-avatar';
import { toChecksumHexAddress } from '../../../../shared/modules/hexstring-utils';

export type NotificationDetailAddressProps = {
Expand Down Expand Up @@ -38,7 +39,7 @@ export const NotificationDetailAddress: FC<NotificationDetailAddressProps> = ({

return (
<NotificationDetail
icon={<AvatarAccount address={address} />}
icon={<PreferredAvatar address={address} />}
primaryTextLeft={<SideText side={side} />}
secondaryTextLeft={
<NotificationDetailCopyButton
Expand Down
Loading