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

chore(protobuf): update protobuf definitions (display type enum added) #15588

Merged
merged 3 commits into from
Nov 27, 2024

Conversation

mroz22
Copy link
Contributor

@mroz22 mroz22 commented Nov 26, 2024

No description provided.

@mroz22 mroz22 force-pushed the mv-update-protobuf branch from 8138dee to c6ea629 Compare November 26, 2024 17:50
Copy link

github-actions bot commented Nov 26, 2024

🚀 Expo preview is ready!

  • Project → trezor-suite-preview
  • Platforms → android, ios
  • Scheme → trezorsuitelite
  • Runtime Version → 12
  • More info

Learn more about 𝝠 Expo Github Action

@mroz22 mroz22 force-pushed the mv-update-protobuf branch from c6ea629 to 8f13b82 Compare November 26, 2024 18:24
@mroz22 mroz22 changed the title chore(protobuf): update protobuf definitions (display type enum added) [wip] chore(protobuf): update protobuf definitions (display type enum added) Nov 26, 2024
@mroz22 mroz22 force-pushed the mv-update-protobuf branch 2 times, most recently from f44d36b to 0d5861f Compare November 27, 2024 11:13
@@ -5,4 +5,4 @@ export * from './types';
export { parseConfigure, createMessageFromName, createMessageFromType } from './utils';
export * as MessagesSchema from './messages-schema';
// It's problem to reexport enums when they are under MessagesSchema namespace, check packages/connect/src/types/device.ts
export { DeviceModelInternal } from './messages-schema';
export { DeviceModelInternal, DisplayRotation, Enum_DisplayRotation } from './messages-schema';
Copy link
Contributor Author

@mroz22 mroz22 Nov 27, 2024

Choose a reason for hiding this comment

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

is this the way we want to export these? cc @martykan

Copy link
Member

Choose a reason for hiding this comment

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

I don't know... DeviceModelInternal seems important enough to re-export separately, but I don't think it's the best approach for every single enum.
If we want to re-export in device.ts something like this should work:

export type DisplayRotation = PROTO.DisplayRotation;

@@ -147,7 +147,7 @@ export type UnreadableDevice = BaseDevice & {
export type Device = KnownDevice | UnknownDevice | UnreadableDevice;
export type Features = PROTO.Features;

export { DeviceModelInternal } from '@trezor/protobuf';
export { DeviceModelInternal, Enum_DisplayRotation, DisplayRotation } from '@trezor/protobuf';
Copy link
Contributor

Choose a reason for hiding this comment

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

the export of the underscored value seems odd, but if its intentional 🤷

@mroz22
Copy link
Contributor Author

mroz22 commented Nov 27, 2024

/rebase

Copy link

Copy link

Rebasing failed, please rebase manually.

@mroz22 mroz22 force-pushed the mv-update-protobuf branch 2 times, most recently from 9067a82 to 812bb14 Compare November 27, 2024 14:32
@mroz22 mroz22 changed the title [wip] chore(protobuf): update protobuf definitions (display type enum added) chore(protobuf): update protobuf definitions (display type enum added) Nov 27, 2024
@mroz22 mroz22 force-pushed the mv-update-protobuf branch from 812bb14 to a882b45 Compare November 27, 2024 15:07
@mroz22 mroz22 marked this pull request as ready for review November 27, 2024 15:56
@mroz22 mroz22 merged commit caba776 into develop Nov 27, 2024
68 checks passed
@mroz22 mroz22 deleted the mv-update-protobuf branch November 27, 2024 15:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants