Skip to content

Commit

Permalink
chore(connect): add basic types support for T3B1
Browse files Browse the repository at this point in the history
  • Loading branch information
mroz22 committed Jul 19, 2024
1 parent b98a7c6 commit 6a61f4c
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 1 deletion.
1 change: 1 addition & 0 deletions packages/connect/src/api/ethereum/ethereumDefinitions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ export const ethereumNetworkInfoFromDefinition = (
T1B1: '1.6.2',
T2T1: '2.0.7',
T2B1: '2.6.1',
T3B1: '2.6.1',
T3T1: '2.7.1',
},
blockchainLink: undefined,
Expand Down
1 change: 1 addition & 0 deletions packages/connect/src/core/AbstractMethod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ export const DEFAULT_FIRMWARE_RANGE: FirmwareRange = {
T1B1: { min: '1.0.0', max: '0' },
T2T1: { min: '2.0.0', max: '0' },
T2B1: { min: '2.6.1', max: '0' },
T3B1: { min: '2.6.1', max: '0' },
T3T1: { min: '2.7.1', max: '0' },
};

Expand Down
8 changes: 7 additions & 1 deletion packages/connect/src/data/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,13 @@ export const config = {
},
{
methods: ['changeLanguage'],
min: { T1B1: '0', T2T1: '2.7.0', T2B1: '2.7.0', T3T1: '2.7.1' },
min: {
T1B1: '0',
T2T1: '2.7.0',
T2B1: '2.7.0',
T3B1: '2.7.0', // adding T3B1 to the list so that it gets inferred as type
T3T1: '2.7.1',
},
},
],
};
6 changes: 6 additions & 0 deletions packages/connect/src/data/models.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,10 @@ export const models = {
'4': 'Bitcoin Orange',
},
},
T3B1: {
name: 'Trezor NFT only',
colors: {
'1': 'Retarded pink',
},
},
};
1 change: 1 addition & 0 deletions packages/connect/src/utils/assetUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ const firmwareAssets: Record<DeviceModelInternal, NodeRequire> = {
[DeviceModelInternal.T1B1]: require('@trezor/connect-common/files/firmware/t1b1/releases.json'),
[DeviceModelInternal.T2T1]: require('@trezor/connect-common/files/firmware/t2t1/releases.json'),
[DeviceModelInternal.T2B1]: require('@trezor/connect-common/files/firmware/t2b1/releases.json'),
[DeviceModelInternal.T3B1]: require('@trezor/connect-common/files/firmware/t2b1/releases.json'), // todo: file doesn't exist yet
[DeviceModelInternal.T3T1]: require('@trezor/connect-common/files/firmware/t3t1/releases.json'),
};

Expand Down
1 change: 1 addition & 0 deletions packages/protobuf/scripts/protobuf-types.js
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,7 @@ lines.push(
T1B1 = 'T1B1',
T2T1 = 'T2T1',
T2B1 = 'T2B1',
T3B1 = 'T3B1',
T3T1 = 'T3T1',
}`,
'',
Expand Down
1 change: 1 addition & 0 deletions packages/protobuf/src/messages-schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ export enum DeviceModelInternal {
T1B1 = 'T1B1',
T2T1 = 'T2T1',
T2B1 = 'T2B1',
T3B1 = 'T3B1',
T3T1 = 'T3T1',
}

Expand Down

0 comments on commit 6a61f4c

Please sign in to comment.