Skip to content

Commit 0c8e947

Browse files
committed
Merge branch 'bb02-go'
2 parents 0be83dd + f22368a commit 0c8e947

File tree

13 files changed

+320
-120
lines changed

13 files changed

+320
-120
lines changed

frontends/web/src/api/bitbox02.ts

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,19 @@ import { TSubscriptionCallback, subscribeEndpoint } from './subscribe';
2323
export const errUserAbort = 104;
2424

2525
export type DeviceInfo = {
26-
initialized: boolean;
27-
mnemonicPassphraseEnabled: boolean;
28-
name: string;
29-
securechipModel: string;
30-
version: string;
26+
initialized: boolean;
27+
mnemonicPassphraseEnabled: boolean;
28+
name: string;
29+
securechipModel: string;
30+
version: string;
31+
bluetooth: null | {
32+
firmwareVersion: string;
33+
enabled: boolean;
34+
};
3135
}
3236

3337
type DeviceInfoResponse = SuccessResponse & {
34-
deviceInfo: DeviceInfo;
38+
deviceInfo: DeviceInfo;
3539
};
3640

3741
export const resetDevice = (deviceID: string): Promise<SuccessResponse | FailResponse> => {

frontends/web/src/routes/settings/bb02-settings.tsx

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ import { alertUser } from '@/components/alert/Alert';
3030
import { Skeleton } from '@/components/skeleton/skeleton';
3131
import { AttestationCheckSetting } from './components/device-settings/attestation-check-setting';
3232
import { FirmwareSetting } from './components/device-settings/firmware-setting';
33+
import { BluetoothFirmwareSetting } from './components/device-settings/bluetooth-firmware-setting';
3334
import { SecureChipSetting } from './components/device-settings/secure-chip-setting';
3435
import { DeviceNameSetting } from './components/device-settings/device-name-setting';
3536
import { FactoryResetSetting } from './components/device-settings/factory-reset-setting';
@@ -106,6 +107,7 @@ const Content = ({ deviceID }: TProps) => {
106107
return;
107108
}
108109
setDeviceInfo(result.deviceInfo);
110+
console.log('LOL', result);
109111
})
110112
.catch(console.error);
111113
}, [deviceID, t]);
@@ -154,6 +156,18 @@ const Content = ({ deviceID }: TProps) => {
154156
}
155157
</div>
156158

159+
{/*"Bluetooth" section*/}
160+
{ deviceInfo && deviceInfo.bluetooth ? (
161+
<>
162+
<div className={styles.section}>
163+
<SubTitle className={styles.withMobilePadding}>Bluetooth</SubTitle>
164+
<BluetoothFirmwareSetting
165+
firmwareVersion={deviceInfo.bluetooth.firmwareVersion}
166+
/>
167+
</div>
168+
</>
169+
) : null }
170+
157171
{/*"Expert settings" section*/}
158172
<div className={styles.section}>
159173
<SubTitle className={styles.withMobilePadding}>{t('settings.expert.title')}</SubTitle>
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
/**
2+
* Copyright 2025 Shift Crypto AG
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
import { useTranslation } from 'react-i18next';
18+
import { Checked, RedDot } from '@/components/icon';
19+
import { SettingsItem } from '@/routes/settings/components/settingsItem/settingsItem';
20+
21+
export type TProps = {
22+
firmwareVersion: string;
23+
}
24+
25+
export const BluetoothFirmwareSetting = ({ firmwareVersion }: TProps) => {
26+
const { t } = useTranslation();
27+
28+
// So far there is only one BLE firmware version. This can be adjusted once there is an upgrade
29+
// available.
30+
const canUpgrade = false;
31+
const secondaryText = canUpgrade ? t('deviceSettings.firmware.upgradeAvailable') : t('deviceSettings.firmware.upToDate');
32+
const extraComponent = canUpgrade ? <RedDot width={8} height={8}/> : <Checked />;
33+
34+
return (
35+
<>
36+
<SettingsItem
37+
settingName={t('deviceSettings.firmware.title')}
38+
secondaryText={secondaryText}
39+
displayedValue={firmwareVersion}
40+
extraComponent={extraComponent}
41+
/>
42+
</>
43+
);
44+
};

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ module github.com/BitBoxSwiss/bitbox-wallet-app
33
go 1.23
44

55
require (
6-
github.com/BitBoxSwiss/bitbox02-api-go v0.0.0-20250603143443-7eb26c21237d
6+
github.com/BitBoxSwiss/bitbox02-api-go v0.0.0-20250624081228-dba834f08d4b
77
github.com/BitBoxSwiss/block-client-go v0.0.0-20241009081439-924dde98b9c1
88
github.com/btcsuite/btcd v0.24.2
99
github.com/btcsuite/btcd/btcec/v2 v2.3.4

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
github.com/BitBoxSwiss/bitbox02-api-go v0.0.0-20250603143443-7eb26c21237d h1:D+vIpL0jt1KRvFgfPfe6FwMb4a96e5vgC38WAlqv/rw=
2-
github.com/BitBoxSwiss/bitbox02-api-go v0.0.0-20250603143443-7eb26c21237d/go.mod h1:lyYwD22hA6TQ8XNXx37VE75Exp6qYdgZgUAO4+lyhSU=
1+
github.com/BitBoxSwiss/bitbox02-api-go v0.0.0-20250624081228-dba834f08d4b h1:b7btgkW7SJ/Q48ePS5ExybsP95YoaWidn0o2axt9Fws=
2+
github.com/BitBoxSwiss/bitbox02-api-go v0.0.0-20250624081228-dba834f08d4b/go.mod h1:lyYwD22hA6TQ8XNXx37VE75Exp6qYdgZgUAO4+lyhSU=
33
github.com/BitBoxSwiss/block-client-go v0.0.0-20241009081439-924dde98b9c1 h1:5hjP8mYSVKFibesrz8L6U0Vp5zSJt0LwXB3DSZGhnSo=
44
github.com/BitBoxSwiss/block-client-go v0.0.0-20241009081439-924dde98b9c1/go.mod h1:SJTiQZU9ggBzVKMni97rpNS9GddPKErndFXNSDrfEGc=
55
github.com/DataDog/zstd v1.4.5 h1:EndNeuB0l9syBZhut0wns3gV1hL8zX8LIu6ZiVHWLIQ=

vendor/github.com/BitBoxSwiss/bitbox02-api-go/api/firmware/bluetooth.go

Lines changed: 25 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/BitBoxSwiss/bitbox02-api-go/api/firmware/device.go

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/BitBoxSwiss/bitbox02-api-go/api/firmware/messages/bitbox02_system.pb.go

Lines changed: 48 additions & 25 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/BitBoxSwiss/bitbox02-api-go/api/firmware/messages/bitbox02_system.proto

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)