From 12af70577eff4adeef612ebfa6cd9949fa0ef938 Mon Sep 17 00:00:00 2001 From: Tomas Martykan Date: Thu, 28 Nov 2024 15:45:19 +0100 Subject: [PATCH] fix(protobuf): ApplySettings.display_rotation allow both enum keys and values --- packages/protobuf/scripts/protobuf-patches/index.ts | 1 + packages/protobuf/src/messages-schema.ts | 2 +- packages/protobuf/src/messages.ts | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/protobuf/scripts/protobuf-patches/index.ts b/packages/protobuf/scripts/protobuf-patches/index.ts index 667e11e294c..df2be769a76 100644 --- a/packages/protobuf/scripts/protobuf-patches/index.ts +++ b/packages/protobuf/scripts/protobuf-patches/index.ts @@ -158,6 +158,7 @@ export const TYPE_PATCH = { 'Features.display_rotation': 'DisplayRotation | null', 'Features.experimental_features': 'boolean | null', 'Features.internal_model': DeviceModelInternal, + 'ApplySettings.display_rotation': 'DisplayRotation | Enum_DisplayRotation', 'HDNodePathType.node': 'HDNodeType | string', 'FirmwareUpload.payload': 'Buffer | ArrayBuffer', 'EthereumGetAddress.encoded_network': 'ArrayBuffer', diff --git a/packages/protobuf/src/messages-schema.ts b/packages/protobuf/src/messages-schema.ts index 97bac4802b8..815dc9887e2 100644 --- a/packages/protobuf/src/messages-schema.ts +++ b/packages/protobuf/src/messages-schema.ts @@ -2402,7 +2402,7 @@ export const ApplySettings = Type.Object( homescreen: Type.Optional(Type.String()), _passphrase_source: Type.Optional(Type.Number()), auto_lock_delay_ms: Type.Optional(Type.Number()), - display_rotation: Type.Optional(DisplayRotation), + display_rotation: Type.Optional(Type.Union([DisplayRotation, EnumEnum_DisplayRotation])), passphrase_always_on_device: Type.Optional(Type.Boolean()), safety_checks: Type.Optional(SafetyCheckLevel), experimental_features: Type.Optional(Type.Boolean()), diff --git a/packages/protobuf/src/messages.ts b/packages/protobuf/src/messages.ts index a579c75ca7a..2531a6c4f05 100644 --- a/packages/protobuf/src/messages.ts +++ b/packages/protobuf/src/messages.ts @@ -1586,7 +1586,7 @@ export type ApplySettings = { homescreen?: string; _passphrase_source?: number; auto_lock_delay_ms?: number; - display_rotation?: DisplayRotation; + display_rotation?: DisplayRotation | Enum_DisplayRotation; passphrase_always_on_device?: boolean; safety_checks?: SafetyCheckLevel; experimental_features?: boolean;