Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

T3T1 in Suite and Connect #11968

Merged
merged 6 commits into from
Apr 19, 2024
Merged

T3T1 in Suite and Connect #11968

merged 6 commits into from
Apr 19, 2024

Conversation

mroz22
Copy link
Contributor

@mroz22 mroz22 commented Apr 11, 2024

Added support for T3T1

  • device authenticity check does not work as certificate reports as T2B1, you have to turn it off in settings
  • added placeholder images of TS5
  • done some refactorings

@mroz22
Copy link
Contributor Author

mroz22 commented Apr 11, 2024

cc @Hannsek t3t1 should more or less work in suite (develop) even without these changes here.
these changes make it somewhat more functional.

@mroz22
Copy link
Contributor Author

mroz22 commented Apr 11, 2024

I am quite surprised how many changes were needed to satisfy the type-check in suite and native.

We don't have t3t1 images, it would be nice to get some dummy images. So far I have only put todo comments and model T images there.

@mroz22 mroz22 changed the title Connect/ts5 vol1 t3t1 in connect and suite Apr 11, 2024
@komret komret requested a review from tomasklim April 11, 2024 12:27
@Hannsek
Copy link
Contributor

Hannsek commented Apr 11, 2024

Model T images are quite dangerous. We need to make sure we will replace them with proper ones.

@MiroslavProchazka
Copy link
Contributor

MiroslavProchazka commented Apr 14, 2024

I am quite surprised how many changes were needed to satisfy the type-check in suite and native.

We don't have t3t1 images, it would be nice to get some dummy images. So far I have only put todo comments and model T images there.

I've created simple t3t1 placeholder image which should be easily recognizable from other devices. I'm tracking the progress of adding new renders/animations in #11841 and https://www.notion.so/satoshilabs/Trezor-graphic-redesign-tasks-ac5ac14135c3430b9c3520371e463025?pvs=4
cc @Hannsek @mroz22

@tomasklim tomasklim force-pushed the connect/ts5-vol1 branch 2 times, most recently from 372dfe1 to 2c709bf Compare April 16, 2024 15:27
@mroz22 mroz22 requested a review from komret as a code owner April 16, 2024 15:27
@tomasklim tomasklim self-assigned this Apr 16, 2024
@tomasklim tomasklim force-pushed the connect/ts5-vol1 branch 2 times, most recently from 97e51d4 to f1b1787 Compare April 17, 2024 17:17
@mroz22 mroz22 requested a review from tsusanka as a code owner April 17, 2024 17:17
@tomasklim tomasklim changed the title t3t1 in connect and suite T3T1 in Suite and Connect Apr 17, 2024
@tomasklim tomasklim removed request for a team and jvaclavik April 17, 2024 17:22
@Hannsek Hannsek added the build-desktop This will trigger the build of desktop apps for your PR label Apr 17, 2024
@tomasklim tomasklim force-pushed the connect/ts5-vol1 branch 3 times, most recently from f98bda0 to 2b198f3 Compare April 18, 2024 14:23
@tomasklim tomasklim force-pushed the connect/ts5-vol1 branch 2 times, most recently from 497c233 to 2687b50 Compare April 18, 2024 15:00
steps={5}
activeStep={5}
onCancel={() => {}}
deviceModelInternal={DeviceModelInternal.T2T1}
deviceModelInternal={DeviceModelInternal.T3T1}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lets keep T2T1 and use T3T1 as separate line

@@ -32,6 +32,7 @@ export const CoinSupport = Type.Object({
T1B1: Type.Union([Type.String(), Type.Literal(false)]),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

extract to:

const xxx: Record<DeviceEnum, Type.?????> = {
   T1B1: Type.Union([Type.String(), Type.Literal(false)]),
    T2T1: Type.Union([Type.String(), Type.Literal(false)]),
    T2B1: Type.Union([Type.String(), Type.Literal(false)]),
    T3T1: Type.Union([Type.String(), Type.Literal(false)]),
}

Copy link
Member

@martykan martykan Apr 18, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The whole thing could be refactored to

export const CoinSupport = Type.Composite([
    Type.Object({
        connect: Type.Boolean(),
    }),
    Type.Record(
        Type.KeyOfEnum(DeviceModelInternal),
        Type.Union([Type.String(), Type.Literal(false)]),
    ),
]);

which resolves to

type CoinSupport = {
    connect: boolean;
    T1B1: string | false;
    T2T1: string | false;
    T2B1: string | false;
    T3T1: string | false;
}

Copy link
Contributor

@peter-sanderson peter-sanderson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just types and small stuff, can be solved in other PR to avoid conflicts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build-desktop This will trigger the build of desktop apps for your PR
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

8 participants