Skip to content

Commit

Permalink
fix(suite-native): device label instead device name (trezor#10111)
Browse files Browse the repository at this point in the history
  • Loading branch information
juriczech authored Nov 29, 2023
1 parent fb8aef2 commit 350a52f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions suite-common/wallet-core/src/device/deviceReducer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -650,9 +650,9 @@ export const selectDeviceNameById = (
return device?.name ?? null;
};

export const selectSelectedDeviceName = (state: DeviceRootState) => {
export const selectSelectedDeviceLabel = (state: DeviceRootState) => {
const selectedDevice = selectDevice(state);
return selectDeviceNameById(state, selectedDevice?.id);
return selectDeviceLabelById(state, selectedDevice?.id);
};

export const selectDeviceId = (state: DeviceRootState) => {
Expand Down
6 changes: 3 additions & 3 deletions suite-native/device/src/screens/DeviceInfoModalScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import {
selectDeviceModel,
selectDeviceReleaseInfo,
selectIsSelectedDeviceImported,
selectSelectedDeviceName,
selectSelectedDeviceLabel,
} from '@suite-common/wallet-core';
import { prepareNativeStyle, useNativeStyles } from '@trezor/styles';
import { useTranslate } from '@suite-native/intl';
Expand Down Expand Up @@ -51,7 +51,7 @@ export const DeviceInfoModalScreen = () => {
const openLink = useOpenLink();

const deviceModel = useSelector(selectDeviceModel);
const deviceName = useSelector(selectSelectedDeviceName);
const deviceLabel = useSelector(selectSelectedDeviceLabel);
const device = useSelector(selectDevice);
const isPortfolioTrackerDevice = useSelector(selectIsSelectedDeviceImported);
const deviceReleaseInfo = useSelector(selectDeviceReleaseInfo);
Expand Down Expand Up @@ -132,7 +132,7 @@ export const DeviceInfoModalScreen = () => {
<HStack spacing="large">
<Image width={92} height={151} source={deviceImage[deviceModel]} />
<Box justifyContent="center">
<Text variant="titleSmall">{deviceName}</Text>
<Text variant="titleSmall">{deviceLabel}</Text>
<Text variant="hint">
{translate('deviceInfo.installedFw', {
version: currentFwVersion,
Expand Down

0 comments on commit 350a52f

Please sign in to comment.