-
-
Notifications
You must be signed in to change notification settings - Fork 267
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: introduce internal_model UNKNOWN, add support for it in the Suite
wip(suite): implement UNKNOWN internal model
- Loading branch information
1 parent
c5b661d
commit d3aec49
Showing
33 changed files
with
94 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,7 @@ export const SVG_IMAGES = { | |
UNI_SUCCESS: 'uni-success.svg', | ||
UNI_WARNING: 'uni-warning.svg', | ||
BRIDGE_CHECK_TREZOR_T2T1: 'bridge-check-trezor-t2t1.svg', | ||
DEVICE_CONFIRM_TREZOR_UNKNOWN: 'device-confirm-trezor-unknown.svg', | ||
DEVICE_CONFIRM_TREZOR_T1B1: 'device-confirm-trezor-t1b1.svg', | ||
DEVICE_CONFIRM_TREZOR_T2T1: 'device-confirm-trezor-t2t1.svg', | ||
DEVICE_CONFIRM_TREZOR_T2B1: 'device-confirm-trezor-t3b1.svg', | ||
|
@@ -81,6 +82,8 @@ export const PNG_IMAGES = { | |
UNDERSTAND_2x: '[email protected]', | ||
WALLET: 'wallet.png', | ||
WALLET_2x: '[email protected]', | ||
DONT_DISCONNECT_TREZOR_UNKNOWN: 'dont-disconnect-trezor-unknown.png', | ||
DONT_DISCONNECT_TREZOR_UNKNOWN_2x: '[email protected]', | ||
DONT_DISCONNECT_TREZOR_T2T1: 'dont-disconnect-trezor-t2t1.png', | ||
DONT_DISCONNECT_TREZOR_T2T1_2x: '[email protected]', | ||
DONT_DISCONNECT_TREZOR_T1B1: 'dont-disconnect-trezor-t1b1.png', | ||
|
@@ -93,6 +96,8 @@ export const PNG_IMAGES = { | |
DONT_DISCONNECT_TREZOR_T3T1_2x: '[email protected]', | ||
DONT_DISCONNECT_TREZOR_T3W1: 'dont-disconnect-trezor-t3w1.png', | ||
DONT_DISCONNECT_TREZOR_T3W1_2x: '[email protected]', | ||
TREZOR_UNKNOWN: 'trezor-unknown.png', | ||
TREZOR_UNKNOWN_2x: '[email protected]', | ||
TREZOR_T1B1: 'trezor-t1b1.png', | ||
TREZOR_T1B1_2x: '[email protected]', | ||
TREZOR_T2T1: 'trezor-t2t1.png', | ||
|
@@ -105,6 +110,8 @@ export const PNG_IMAGES = { | |
TREZOR_T3T1_2x: '[email protected]', | ||
TREZOR_T3W1: 'trezor-t3w1.png', | ||
TREZOR_T3W1_2x: '[email protected]', | ||
TREZOR_UNKNOWN_LARGE: 'trezor-unknown-large.png', | ||
TREZOR_UNKNOWN_LARGE_2x: '[email protected]', | ||
TREZOR_T1B1_LARGE: 'trezor-t1b1-large.png', | ||
TREZOR_T1B1_LARGE_2x: '[email protected]', | ||
TREZOR_T2T1_LARGE: 'trezor-t2t1-large.png', | ||
|
@@ -117,6 +124,8 @@ export const PNG_IMAGES = { | |
TREZOR_T3T1_LARGE_2x: '[email protected]', | ||
TREZOR_T3W1_LARGE: 'trezor-t3w1-large.png', | ||
TREZOR_T3W1_LARGE_2x: '[email protected]', | ||
TREZOR_UNKNOWN_GHOST: 'trezor-unknown-ghost.png', | ||
TREZOR_UNKNOWN_GHOST_2x: '[email protected]', | ||
TREZOR_T1B1_GHOST: 'trezor-t1b1-ghost.png', | ||
TREZOR_T1B1_GHOST_2x: '[email protected]', | ||
TREZOR_T2T1_GHOST: 'trezor-t2t1-ghost.png', | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 14 additions & 1 deletion
15
packages/product-components/src/utils/mapTrezorModelToIcon.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,24 @@ | ||
import { IconName } from '@trezor/components'; | ||
import { DeviceModelInternal } from '@trezor/connect'; | ||
|
||
export const mapTrezorModelToIcon: Record<DeviceModelInternal, IconName> = { | ||
export const mapTrezorModelToIconFilled: Record<DeviceModelInternal, IconName> = { | ||
[DeviceModelInternal.T1B1]: 'trezorModelOneFilled', | ||
[DeviceModelInternal.T2T1]: 'trezorModelTFilled', | ||
[DeviceModelInternal.T2B1]: 'trezorSafe3Filled', | ||
[DeviceModelInternal.T3B1]: 'trezorSafe3Filled', | ||
[DeviceModelInternal.T3T1]: 'trezorSafe5Filled', | ||
[DeviceModelInternal.T3W1]: 'trezorSafe7Filled', | ||
|
||
[DeviceModelInternal.UNKNOWN]: 'trezorModelOneFilled', // Just to provide something that wont break UI | ||
}; | ||
|
||
export const mapTrezorModelToIcon: Record<DeviceModelInternal, IconName> = { | ||
[DeviceModelInternal.T1B1]: 'trezorT1B1', | ||
[DeviceModelInternal.T2T1]: 'trezorT2T1', | ||
[DeviceModelInternal.T2B1]: 'trezorT2B1', | ||
[DeviceModelInternal.T3B1]: 'trezorT3B1', | ||
[DeviceModelInternal.T3T1]: 'trezorT3T1', | ||
[DeviceModelInternal.T3W1]: 'trezorT3W1', | ||
|
||
[DeviceModelInternal.UNKNOWN]: 'trezorT1B1', // Just to provide something that wont break UI | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,4 +5,5 @@ export enum DeviceModelInternal { | |
T3B1 = 'T3B1', | ||
T3T1 = 'T3T1', | ||
T3W1 = 'T3W1', | ||
UNKNOWN = 'UNKNOWN', | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file added
BIN
+1.54 KB
packages/suite-data/files/images/png/dont-disconnect-trezor-unknown.png
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.
10 changes: 10 additions & 0 deletions
10
packages/suite-data/files/images/svg/device_confirm_trezor_unknown.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.