Skip to content

Commit

Permalink
fixup! chore(suite): use device.features.label instead of device.label
Browse files Browse the repository at this point in the history
  • Loading branch information
komret committed Sep 24, 2024
1 parent 324f512 commit e6ecafe
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import type { ComponentType } from 'react';
import { useSelector } from 'react-redux';

import { AUTH_DEVICE, type NotificationEntry } from '@suite-common/toast-notifications';
import { selectDeviceLabelOrName } from '@suite-common/wallet-core';
import { DEVICE } from '@trezor/connect';

import { NotificationViewProps } from 'src/components/suite';
Expand Down Expand Up @@ -62,6 +64,8 @@ export const NotificationRenderer = ({
notification,
render,
}: NotificationRendererProps): JSX.Element => {
const deviceLabel = useSelector(selectDeviceLabelOrName);

switch (notification.type) {
case 'acquire-error':
return error(render, notification, 'TOAST_ACQUIRE_ERROR');
Expand Down Expand Up @@ -223,7 +227,7 @@ export const NotificationRenderer = ({
variant="info"
message="EVENT_DEVICE_CONNECT"
messageValues={{
label: notification.device.features?.label || notification.device.name,
label: deviceLabel,
}}
/>
);
Expand Down

0 comments on commit e6ecafe

Please sign in to comment.