Skip to content

Commit

Permalink
feat(suite): images, logic, videos for T3W1
Browse files Browse the repository at this point in the history
  • Loading branch information
MiroslavProchazka committed Sep 29, 2024
1 parent 03347b5 commit 513463b
Show file tree
Hide file tree
Showing 40 changed files with 222 additions and 4 deletions.
9 changes: 9 additions & 0 deletions packages/components/src/components/Image/images.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ export const SVG_IMAGES = {
DEVICE_CONFIRM_TREZOR_T2B1: 'device-confirm-trezor-t3b1.svg',
DEVICE_CONFIRM_TREZOR_T3B1: 'device-confirm-trezor-t3b1.svg',
DEVICE_CONFIRM_TREZOR_T3T1: 'device-confirm-trezor-t3t1.svg',
DEVICE_CONFIRM_TREZOR_T3W1: 'device-confirm-trezor-t3w1.svg',
SPINNER: 'spinner.svg',
SPINNER_GREY: 'spinner-grey.svg',
SPINNER_LIGHT_GREY: 'spinner-light-grey.svg',
Expand Down Expand Up @@ -92,6 +93,8 @@ export const PNG_IMAGES = {
DONT_DISCONNECT_TREZOR_T3B1_2x: 'dont-disconnect-trezor-t3b1@2x.png',
DONT_DISCONNECT_TREZOR_T3T1: 'dont-disconnect-trezor-t3t1.png',
DONT_DISCONNECT_TREZOR_T3T1_2x: 'dont-disconnect-trezor-t3t1@2x.png',
DONT_DISCONNECT_TREZOR_T3W1: 'dont-disconnect-trezor-t3w1.png',
DONT_DISCONNECT_TREZOR_T3W1_2x: 'dont-disconnect-trezor-t3w1@2x.png',
TREZOR_T1B1: 'trezor-t1b1.png',
TREZOR_T1B1_2x: 'trezor-t1b1@2x.png',
TREZOR_T2T1: 'trezor-t2t1.png',
Expand All @@ -102,6 +105,8 @@ export const PNG_IMAGES = {
TREZOR_T3B1_2x: 'trezor-t3b1@2x.png',
TREZOR_T3T1: 'trezor-t3t1.png',
TREZOR_T3T1_2x: 'trezor-t3t1@2x.png',
TREZOR_T3W1: 'trezor-t3w1.png',
TREZOR_T3W1_2x: 'trezor-t3w1@2x.png',
TREZOR_T1B1_LARGE: 'trezor-t1b1-large.png',
TREZOR_T1B1_LARGE_2x: 'trezor-t1b1-large@2x.png',
TREZOR_T2T1_LARGE: 'trezor-t2t1-large.png',
Expand All @@ -112,6 +117,8 @@ export const PNG_IMAGES = {
TREZOR_T3B1_LARGE_2x: 'trezor-t3b1-large@2x.png',
TREZOR_T3T1_LARGE: 'trezor-t3t1-large.png',
TREZOR_T3T1_LARGE_2x: 'trezor-t3t1-large@2x.png',
TREZOR_T3W1_LARGE: 'trezor-t3w1-large.png',
TREZOR_T3W1_LARGE_2x: 'trezor-t3w1-large@2x.png',
TREZOR_T1B1_GHOST: 'trezor-t1b1-ghost.png',
TREZOR_T1B1_GHOST_2x: 'trezor-t1b1-ghost@2x.png',
TREZOR_T2T1_GHOST: 'trezor-t2t1-ghost.png',
Expand All @@ -122,6 +129,8 @@ export const PNG_IMAGES = {
TREZOR_T3B1_GHOST_2x: 'trezor-t3b1-ghost@2x.png',
TREZOR_T3T1_GHOST: 'trezor-t3t1-ghost.png',
TREZOR_T3T1_GHOST_2x: 'trezor-t3t1-ghost@2x.png',
TREZOR_T3W1_GHOST: 'trezor-t3w1-ghost.png',
TREZOR_T3W1_GHOST_2x: 'trezor-t3w1-ghost@2x.png',
TREZOR_SAFE_PROMO_PRODUCTS: 'trezor-safe-promo-products.png',
TREZOR_SAFE_PROMO_PRODUCTS_2x: 'trezor-safe-promo-products@2x.png',
} as const;
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ export const DeviceAnimation = forwardRef<HTMLVideoElement, DeviceAnimationProps
DeviceModelInternal.T2B1,
DeviceModelInternal.T3B1,
DeviceModelInternal.T3T1,
DeviceModelInternal.T3W1,
].includes(deviceModelInternal)
? ''
: `_${theme.legacy.THEME}`;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,5 +106,15 @@ export const ConfirmOnDevice: StoryFn = () => (
deviceModelInternal={DeviceModelInternal.T3T1}
/>
</StoryColumn>
<StoryColumn minWidth={300}>
<ConfirmOnDeviceComponent
successText="Confirmed"
title="Confirm on T3W1"
steps={5}
activeStep={5}
onCancel={() => {}}
deviceModelInternal={DeviceModelInternal.T3W1}
/>
</StoryColumn>
</>
);
1 change: 1 addition & 0 deletions packages/protobuf/src/messages-schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ export enum DeviceModelInternal {
T2B1 = 'T2B1',
T3B1 = 'T3B1',
T3T1 = 'T3T1',
T3W1 = 'T3W1',
}

export type EnumDeviceModelInternal = Static<typeof EnumDeviceModelInternal>;
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
123 changes: 123 additions & 0 deletions packages/suite-data/files/videos/lottie/trezor_t3w1_connect.json

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,7 @@ export const ReconnectDevicePrompt = ({ onClose, onSuccess }: ReconnectDevicePro
[DeviceModelInternal.T2B1]: 'TR_SWITCH_TO_BOOTLOADER_HOLD_LEFT_BUTTON',
[DeviceModelInternal.T3B1]: 'TR_SWITCH_TO_BOOTLOADER_HOLD_LEFT_BUTTON',
[DeviceModelInternal.T3T1]: 'TR_SWITCH_TO_BOOTLOADER_SWIPE_YOUR_FINGERS',
[DeviceModelInternal.T3W1]: 'TR_SWITCH_TO_BOOTLOADER_SWIPE_YOUR_FINGERS',
};

return switchToBootloaderMap[deviceModelFromEvent];
Expand Down
2 changes: 2 additions & 0 deletions packages/suite/src/config/onboarding/steps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ const steps: Step[] = [
DeviceModelInternal.T2B1,
DeviceModelInternal.T3B1,
DeviceModelInternal.T3T1,
DeviceModelInternal.T3W1,
],
prerequisites: [...commonPrerequisites, 'device-recovery-mode', 'device-different'],
},
Expand All @@ -50,6 +51,7 @@ const steps: Step[] = [
DeviceModelInternal.T2B1,
DeviceModelInternal.T3B1,
{ model: DeviceModelInternal.T3T1, minFwVersion: '2.8.0' },
DeviceModelInternal.T3W1,
],
prerequisites: [...commonPrerequisites, 'device-recovery-mode', 'device-different'],
},
Expand Down
7 changes: 7 additions & 0 deletions packages/suite/src/constants/suite/device.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ export const DEFAULT_STRENGTH: Record<DeviceModelInternal, number> = {
[DeviceModelInternal.T2B1]: 128,
[DeviceModelInternal.T3B1]: 128,
[DeviceModelInternal.T3T1]: 128,
[DeviceModelInternal.T3W1]: 128,
};

export const MAX_ROWS_PER_PAGE: Record<DeviceModelInternal, number> = {
Expand All @@ -18,6 +19,7 @@ export const MAX_ROWS_PER_PAGE: Record<DeviceModelInternal, number> = {
[DeviceModelInternal.T2B1]: 4,
[DeviceModelInternal.T3B1]: 4,
[DeviceModelInternal.T3T1]: 7,
[DeviceModelInternal.T3W1]: 7,
};

export const MAX_CHARACTERS_ON_ROW: Record<DeviceModelInternal, number> = {
Expand All @@ -26,6 +28,7 @@ export const MAX_CHARACTERS_ON_ROW: Record<DeviceModelInternal, number> = {
[DeviceModelInternal.T2B1]: 18,
[DeviceModelInternal.T3B1]: 18,
[DeviceModelInternal.T3T1]: 18,
[DeviceModelInternal.T3W1]: 18,
};

export const CHARACTER_OFFSET_FOR_CONTINUES_ARROW: Record<DeviceModelInternal, number> = {
Expand All @@ -34,6 +37,7 @@ export const CHARACTER_OFFSET_FOR_CONTINUES_ARROW: Record<DeviceModelInternal, n
[DeviceModelInternal.T2B1]: 2,
[DeviceModelInternal.T3B1]: 2,
[DeviceModelInternal.T3T1]: 4,
[DeviceModelInternal.T3W1]: 4,
};

export const CHARACTER_OFFSET_FOR_NEXT_ARROW: Record<DeviceModelInternal, number> = {
Expand All @@ -42,6 +46,7 @@ export const CHARACTER_OFFSET_FOR_NEXT_ARROW: Record<DeviceModelInternal, number
[DeviceModelInternal.T2B1]: 2,
[DeviceModelInternal.T3B1]: 2,
[DeviceModelInternal.T3T1]: 4,
[DeviceModelInternal.T3W1]: 4,
};

export const SUPPORTS_DEVICE_AUTHENTICITY_CHECK: Record<DeviceModelInternal, boolean> = {
Expand All @@ -50,6 +55,7 @@ export const SUPPORTS_DEVICE_AUTHENTICITY_CHECK: Record<DeviceModelInternal, boo
[DeviceModelInternal.T2B1]: true,
[DeviceModelInternal.T3B1]: true,
[DeviceModelInternal.T3T1]: true,
[DeviceModelInternal.T3W1]: true,
};

export const HAS_MONOCHROME_SCREEN: Record<DeviceModelInternal, boolean> = {
Expand All @@ -58,4 +64,5 @@ export const HAS_MONOCHROME_SCREEN: Record<DeviceModelInternal, boolean> = {
[DeviceModelInternal.T2B1]: true,
[DeviceModelInternal.T3B1]: true,
[DeviceModelInternal.T3T1]: false,
[DeviceModelInternal.T3W1]: false,
};
7 changes: 7 additions & 0 deletions packages/suite/src/constants/suite/homescreens.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,4 +73,11 @@ export const getHomescreens = (isBitcoinOnlyFirmware: boolean) => ({
'solid',
'smile-2',
],
[DeviceModelInternal.T3W1]: [
isBitcoinOnlyFirmware ? 'orange' : 'green',
'gradient',
isBitcoinOnlyFirmware ? 'green' : 'orange',
'solid',
'smile-2',
],
});
6 changes: 6 additions & 0 deletions packages/suite/src/support/messages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4262,6 +4262,12 @@ export default defineMessages({
'Your wallet backup is entered using the touchscreen. This avoids exposing any of your sensitive information to a potentially insecure computer or web browser.',
dynamic: true,
},
TR_CHECK_RECOVERY_SEED_DESC_T3W1: {
id: 'TR_CHECK_RECOVERY_SEED_DESC_T3W1',
defaultMessage:
'Your wallet backup is entered using the touchscreen. This avoids exposing any of your sensitive information to a potentially insecure computer or web browser.',
dynamic: true,
},
TR_CHECK_RECOVERY_SEED_DESC_T2B1: {
id: 'TR_CHECK_RECOVERY_SEED_DESC_T2B1',
defaultMessage:
Expand Down
1 change: 1 addition & 0 deletions packages/suite/src/utils/firmware/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ const FORMAT_MAP: { [format in FirmwareFormat]: DeviceModelInternal[] } = {
DeviceModelInternal.T2B1,
DeviceModelInternal.T3B1,
DeviceModelInternal.T3T1,
DeviceModelInternal.T3W1,
],
};

Expand Down
3 changes: 2 additions & 1 deletion packages/suite/src/utils/suite/homescreen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ export const deviceModelInformation: Record<
[DeviceModelInternal.T2B1]: safe3Information,
[DeviceModelInternal.T3B1]: safe3Information,
[DeviceModelInternal.T3T1]: { width: 240, height: 240, supports: ['jpeg'] },
[DeviceModelInternal.T3W1]: { width: 240, height: 240, supports: ['jpeg'] },
};

export const enum ImageValidationError {
Expand Down Expand Up @@ -324,7 +325,7 @@ export const imagePathToHex = async (
return Buffer.from(arrayBuffer).toString('hex');
}

/*
/*
- However, this method accepts the Canvas format which changes the quality of image
*/
const blob = await response.blob();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,11 @@ export const Homescreen = ({ isDeviceLocked }: HomescreenProps) => {
/>
)}

{[DeviceModelInternal.T2T1, DeviceModelInternal.T3T1].includes(
deviceModelInternal,
) && (
{[
DeviceModelInternal.T2T1,
DeviceModelInternal.T3T1,
DeviceModelInternal.T3W1,
].includes(deviceModelInternal) && (
<TextColumn
title={<Translation id="TR_DEVICE_SETTINGS_HOMESCREEN_TITLE" />}
description={
Expand Down
6 changes: 6 additions & 0 deletions packages/urls/src/urls.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ export const HELP_CENTER_DRY_RUN_T3B1_URL: Url =
'https://trezor.io/learn/a/check-backup-on-trezor-safe-3';
export const HELP_CENTER_DRY_RUN_T3T1_URL: Url =
'https://trezor.io/learn/a/check-backup-on-trezor-safe-5';
export const HELP_CENTER_DRY_RUN_T3W1_URL: Url =
'https://trezor.io/learn/a/check-backup-on-trezor-safe-5';
export const HELP_CENTER_PASSPHRASE_URL: Url =
'https://trezor.io/learn/a/passphrases-and-hidden-wallets';
export const HELP_CENTER_RECOVERY_SEED_URL: Url =
Expand All @@ -57,6 +59,8 @@ export const HELP_CENTER_PACKAGING_T3B1_URL: Url =
'https://trezor.io/learn/a/authenticate-trezor-safe-3';
export const HELP_CENTER_PACKAGING_T3T1_URL: Url =
'https://trezor.io/learn/a/authenticate-trezor-safe-5';
export const HELP_CENTER_PACKAGING_T3W1_URL: Url =
'https://trezor.io/learn/a/authenticate-trezor-safe-5';
export const HELP_CENTER_XRP_URL: Url = 'https://trezor.io/learn/a/ripple-xrp-on-trezor-model-t';
export const HELP_CENTER_CASHADDR_URL: Url = 'https://trezor.io/learn/a/glossary#CashAddr';
export const HELP_CENTER_QR_CODE_URL: Url =
Expand All @@ -77,6 +81,8 @@ export const HELP_CENTER_FW_DOWNGRADE_T3B1_URL: Url =
'https://trezor.io/learn/a/downgrade-firmware-trezor-safe-3';
export const HELP_CENTER_FW_DOWNGRADE_T3T1_URL: Url =
'https://trezor.io/learn/a/downgrade-firmware-trezor-safe-5';
export const HELP_CENTER_FW_DOWNGRADE_T3W1_URL: Url =
'https://trezor.io/learn/a/downgrade-firmware-trezor-safe-5';
export const HELP_CENTER_RECOVERY_ISSUES_URL: Url =
'https://trezor.io/support/a/trezor-recovery-issues';
export const HELP_CENTER_ADVANCED_RECOVERY_URL: Url =
Expand Down
3 changes: 3 additions & 0 deletions suite-common/icons/assets/trezorSafe7.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions suite-common/icons/assets/trezorSafe7Filled.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions suite-common/icons/src/icons.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2432,6 +2432,8 @@ export const icons = {
trezorSafe3Filled: require('../assets/trezorSafe3Filled.svg'),
trezorSafe5: require('../assets/trezorSafe5.svg'),
trezorSafe5Filled: require('../assets/trezorSafe5Filled.svg'),
trezorSafe7: require('../assets/trezorSafe7.svg'),
trezorSafe7Filled: require('../assets/trezorSafe7Filled.svg'),
trezorVibrate: require('../assets/trezorVibrate.svg'),
trezorVibrateFilled: require('../assets/trezorVibrateFilled.svg'),
triangle: require('../assets/triangle.svg'),
Expand Down
4 changes: 4 additions & 0 deletions suite-common/wallet-config/src/networksConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,7 @@ export const networks = {
[DeviceModelInternal.T2B1]: '2.6.1',
[DeviceModelInternal.T3B1]: '2.8.1',
[DeviceModelInternal.T3T1]: '2.7.1',
[DeviceModelInternal.T3W1]: '2.99.99',
},
customBackends: ['blockfrost'],
accountTypes: {
Expand Down Expand Up @@ -367,6 +368,7 @@ export const networks = {
[DeviceModelInternal.T2B1]: '2.6.4',
[DeviceModelInternal.T3B1]: '2.8.1',
[DeviceModelInternal.T3T1]: '2.7.1',
[DeviceModelInternal.T3W1]: '2.99.99',
},
customBackends: ['solana'],
accountTypes: {
Expand Down Expand Up @@ -590,6 +592,7 @@ export const networks = {
[DeviceModelInternal.T2B1]: '2.6.1',
[DeviceModelInternal.T3B1]: '2.8.1',
[DeviceModelInternal.T3T1]: '2.7.1',
[DeviceModelInternal.T3W1]: '2.99.99',
},
customBackends: ['blockfrost'],
accountTypes: {
Expand Down Expand Up @@ -626,6 +629,7 @@ export const networks = {
[DeviceModelInternal.T2B1]: '2.6.4',
[DeviceModelInternal.T3B1]: '2.8.1',
[DeviceModelInternal.T3T1]: '2.7.1',
[DeviceModelInternal.T3W1]: '2.99.99',
},
customBackends: ['solana'],
accountTypes: {},
Expand Down
Binary file added suite-native/device/src/assets/t3w1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions suite-native/device/src/screens/DeviceInfoModalScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ const deviceImageMap: Record<DeviceModelInternal, string> = {
[DeviceModelInternal.T2B1]: require('../assets/t3b1.png'),
[DeviceModelInternal.T3B1]: require('../assets/t3b1.png'),
[DeviceModelInternal.T3T1]: require('../assets/t3t1.png'),
[DeviceModelInternal.T3W1]: require('../assets/t3w1.png'),
};

const emptyBoxStyle = prepareNativeStyle(() => ({
Expand Down
1 change: 1 addition & 0 deletions suite-native/device/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ export const minimalSupportedFirmwareVersion = {
T2B1: [2, 6, 3] as VersionArray,
T3B1: [2, 8, 1] as VersionArray,
T3T1: [2, 7, 1] as VersionArray,
T3W1: [2, 99, 99] as VersionArray,
} as const satisfies Record<DeviceModelInternal, VersionArray>;

export const isFirmwareVersionSupported = (
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ export const deviceImageMap: Record<DeviceModelInternal, string> = {
[DeviceModelInternal.T2B1]: require('../../assets/connect/pin-t3b1.png'),
[DeviceModelInternal.T3B1]: require('../../assets/connect/pin-t3b1.png'),
[DeviceModelInternal.T3T1]: require('../../assets/connect/pin-t3t1.png'),
[DeviceModelInternal.T3W1]: require('../../assets/connect/pin-t3w1.png'),
};

const wrapperStyle = prepareNativeStyle(utils => ({
Expand Down
7 changes: 7 additions & 0 deletions suite-native/receive/src/components/DeviceScreenContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,13 @@ const deviceToContentStyles: Record<DeviceModelInternal, DeviceModelLayoutProps>
lineHeight: 25,
pagerOffset: 60,
},
[DeviceModelInternal.T3W1]: {
fontSource: require('../../../../packages/theme/fonts/RobotoMono-Regular.ttf'),
fontSize: 20,
lineWidth: 230,
lineHeight: 25,
pagerOffset: 60,
},
[DeviceModelInternal.T2B1]: safe3Styles,
[DeviceModelInternal.T3B1]: safe3Styles,
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,14 @@ const deviceModelToSvg: Record<PaginationCompatibleDeviceModel, PaginationModelM
paginatorPrefixY: 4,
paginatorSuffixX: 182.5,
paginatorSuffixY: 82,
},
[DeviceModelInternal.T3W1]: {
paginationPrefixSvg: require('../../assets/addressPaginationPrefixT2T1.svg'),
paginationSuffixSvg: require('../../assets/addressPaginationSuffixT2T1.svg'),
paginatorPrefixX: 0,
paginatorPrefixY: 4,
paginatorSuffixX: 182.5,
paginatorSuffixY: 82,

pagerSvg1: require('../../assets/pager1T2T1.svg'),
pagerSvg2: require('../../assets/pager2T2T1.svg'),
Expand Down

0 comments on commit 513463b

Please sign in to comment.