diff --git a/packages/connect/src/api/applySettings.ts b/packages/connect/src/api/applySettings.ts index a57957b03fe7..a9b32ff6d49f 100644 --- a/packages/connect/src/api/applySettings.ts +++ b/packages/connect/src/api/applySettings.ts @@ -24,6 +24,7 @@ export default class ApplySettings extends AbstractMethod<'applySettings', PROTO safety_checks: payload.safety_checks, experimental_features: payload.experimental_features, _passphrase_source: payload.passphrase_source, + brightness: payload.brightness, }; } diff --git a/packages/protobuf/messages.json b/packages/protobuf/messages.json index e59bbeb442c0..d780ee01f10b 100644 --- a/packages/protobuf/messages.json +++ b/packages/protobuf/messages.json @@ -4566,6 +4566,9 @@ }, "Capability_Translations": { "(bitcoin_only)": true + }, + "Capability_Brightness": { + "(bitcoin_only)": true } }, "values": { @@ -4587,7 +4590,8 @@ "Capability_ShamirGroups": 16, "Capability_PassphraseEntry": 17, "Capability_Solana": 18, - "Capability_Translations": 19 + "Capability_Translations": 19, + "Capability_Brightness": 20 } } } @@ -4657,6 +4661,10 @@ "hide_passphrase_from_host": { "type": "bool", "id": 11 + }, + "brightness": { + "type": "uint32", + "id": 12 } } }, diff --git a/packages/protobuf/src/messages-schema.ts b/packages/protobuf/src/messages-schema.ts index 868a60049dc7..f144a6ae4a57 100644 --- a/packages/protobuf/src/messages-schema.ts +++ b/packages/protobuf/src/messages-schema.ts @@ -2191,6 +2191,7 @@ export enum Enum_Capability { Capability_PassphraseEntry = 17, Capability_Solana = 18, Capability_Translations = 19, + Capability_Brightness = 20, } export type EnumEnum_Capability = Static; @@ -2283,6 +2284,7 @@ export const ApplySettings = Type.Object( safety_checks: Type.Optional(SafetyCheckLevel), experimental_features: Type.Optional(Type.Boolean()), hide_passphrase_from_host: Type.Optional(Type.Boolean()), + brightness: Type.Optional(Type.Number()), }, { $id: 'ApplySettings' }, ); @@ -2818,12 +2820,6 @@ export const NEMDecryptedMessage = Type.Object( { $id: 'NEMDecryptedMessage' }, ); -export type experimental_message = Static; -export const experimental_message = Type.Object({}, { $id: 'experimental_message' }); - -export type experimental_field = Static; -export const experimental_field = Type.Object({}, { $id: 'experimental_field' }); - export type RippleGetAddress = Static; export const RippleGetAddress = Type.Object( { @@ -3398,6 +3394,12 @@ export const TezosSignedTx = Type.Object( { $id: 'TezosSignedTx' }, ); +export type experimental_message = Static; +export const experimental_message = Type.Object({}, { $id: 'experimental_message' }); + +export type experimental_field = Static; +export const experimental_field = Type.Object({}, { $id: 'experimental_field' }); + export type MessageType = Static; export const MessageType = Type.Object( { @@ -3626,8 +3628,6 @@ export const MessageType = Type.Object( NEMSignedTx, NEMDecryptMessage, NEMDecryptedMessage, - experimental_message, - experimental_field, RippleGetAddress, RippleAddress, RipplePayment, @@ -3676,6 +3676,8 @@ export const MessageType = Type.Object( TezosBallotOp, TezosSignTx, TezosSignedTx, + experimental_message, + experimental_field, }, { $id: 'MessageType' }, ); diff --git a/packages/protobuf/src/messages.ts b/packages/protobuf/src/messages.ts index ef9edfb77a3c..1977fc9f9bab 100644 --- a/packages/protobuf/src/messages.ts +++ b/packages/protobuf/src/messages.ts @@ -1551,6 +1551,7 @@ export enum Enum_Capability { Capability_PassphraseEntry = 17, Capability_Solana = 18, Capability_Translations = 19, + Capability_Brightness = 20, } export type Capability = keyof typeof Enum_Capability; @@ -1632,6 +1633,7 @@ export type ApplySettings = { safety_checks?: SafetyCheckLevel; experimental_features?: boolean; hide_passphrase_from_host?: boolean; + brightness?: number; }; // ChangeLanguage diff --git a/packages/suite/src/views/settings/SettingsDevice/Brightness.tsx b/packages/suite/src/views/settings/SettingsDevice/Brightness.tsx index dd3814d3ddbc..8c9e3d33ddce 100644 --- a/packages/suite/src/views/settings/SettingsDevice/Brightness.tsx +++ b/packages/suite/src/views/settings/SettingsDevice/Brightness.tsx @@ -16,18 +16,18 @@ export const Brightness = ({ isDeviceLocked }: DeviceLabelProps) => { const showDebugMenu = useSelector(state => state.suite.settings.debug.showDebugMenu); - const isSupportedDevice = true; //device?.features?.capabilities?.includes('Capability_Brightness'); + const isSupportedDevice = device?.features?.capabilities?.includes('Capability_Brightness'); if (!showDebugMenu || !isSupportedDevice) { return null; } - const brightnessEnabled = true; // device?.features?.brightness ?? false; + const brightnessEnabled = device?.features?.b ?? false; const handleChange = () => { dispatch( applySettings({ - // brightness: !brightnessEnabled + brightness: !brightnessEnabled }), ); analytics.report({