Skip to content

Commit 96ab843

Browse files
authored
Merge pull request #1671 from SatoshiPortal/add-jade-disclaimer
feat: add firmware update warning for Jade device
2 parents 8919670 + fd8c872 commit 96ab843

5 files changed

Lines changed: 35 additions & 11 deletions

File tree

lib/features/import_qr_device/import_qr_device_page.dart

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import 'package:bb_mobile/core/themes/app_theme.dart';
33
import 'package:bb_mobile/core/utils/build_context_x.dart';
44
import 'package:bb_mobile/core/utils/constants.dart';
55
import 'package:bb_mobile/core/widgets/buttons/button.dart';
6+
import 'package:bb_mobile/core/widgets/cards/info_card.dart';
67
import 'package:bb_mobile/core/widgets/text/text.dart';
78
import 'package:bb_mobile/features/import_qr_device/device_instructions_bottom_sheet.dart';
89
import 'package:bb_mobile/features/import_watch_only_wallet/import_watch_only_router.dart';
@@ -41,6 +42,15 @@ class ImportQrDevicePage extends StatelessWidget {
4142
maxLines: 2,
4243
),
4344

45+
if (device == SignerDeviceEntity.jade) ...[
46+
Gap(Device.screen.height * 0.03),
47+
InfoCard(
48+
description: context.loc.importQrDeviceJadeFirmwareWarning,
49+
tagColor: context.appColors.warning,
50+
bgColor: context.appColors.warningContainer,
51+
),
52+
],
53+
4454
Gap(Device.screen.height * 0.05),
4555
Image.asset(
4656
Assets.misc.qRPlaceholder.path,
@@ -53,11 +63,10 @@ class ImportQrDevicePage extends StatelessWidget {
5363
children: [
5464
BBButton.small(
5565
label: context.loc.importQrDeviceButtonOpenCamera,
56-
onPressed:
57-
() => context.pushNamed(
58-
ImportWatchOnlyWalletRoutes.scan.name,
59-
extra: device,
60-
),
66+
onPressed: () => context.pushNamed(
67+
ImportWatchOnlyWalletRoutes.scan.name,
68+
extra: device,
69+
),
6170
bgColor: context.appColors.surface,
6271
textColor: context.appColors.text,
6372
outlined: true,
@@ -66,12 +75,11 @@ class ImportQrDevicePage extends StatelessWidget {
6675
Gap(Device.screen.height * 0.02),
6776
BBButton.small(
6877
label: context.loc.importQrDeviceButtonInstructions,
69-
onPressed:
70-
() => DeviceInstructionsBottomSheet.show(
71-
context,
72-
title: instructionsTitle,
73-
instructions: instructions,
74-
),
78+
onPressed: () => DeviceInstructionsBottomSheet.show(
79+
context,
80+
title: instructionsTitle,
81+
instructions: instructions,
82+
),
7583
bgColor: context.appColors.surface,
7684
textColor: context.appColors.text,
7785
outlined: true,

localization/app_en.arb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9488,6 +9488,10 @@
94889488
"@importQrDeviceJadeStep10": {
94899489
"description": "Jade instruction step 10"
94909490
},
9491+
"importQrDeviceJadeFirmwareWarning": "Make sure your device is updated to the latest firmware",
9492+
"@importQrDeviceJadeFirmwareWarning": {
9493+
"description": "Warning message to update Jade firmware"
9494+
},
94919495
"importQrDeviceKruxName": "Krux",
94929496
"@importQrDeviceKruxName": {
94939497
"description": "Name of Krux device"

localization/app_es.arb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9488,6 +9488,10 @@
94889488
"@importQrDeviceJadeStep10": {
94899489
"description": "Jade instruction step 10"
94909490
},
9491+
"importQrDeviceJadeFirmwareWarning": "Asegúrese de que su dispositivo esté actualizado con el firmware más reciente",
9492+
"@importQrDeviceJadeFirmwareWarning": {
9493+
"description": "Warning message to update Jade firmware"
9494+
},
94919495
"importQrDeviceKruxName": "Krux",
94929496
"@importQrDeviceKruxName": {
94939497
"description": "Name of Krux device"

localization/app_fi.arb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9288,6 +9288,10 @@
92889288
"@importQrDeviceJadeStep10": {
92899289
"description": "Jade instruction step 10"
92909290
},
9291+
"importQrDeviceJadeFirmwareWarning": "Varmista, että laitteesi on päivitetty uusimpaan laiteohjelmistoon",
9292+
"@importQrDeviceJadeFirmwareWarning": {
9293+
"description": "Warning message to update Jade firmware"
9294+
},
92919295
"importQrDeviceKruxName": "Krux",
92929296
"@importQrDeviceKruxName": {
92939297
"description": "Name of Krux device"

localization/app_fr.arb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9488,6 +9488,10 @@
94889488
"@importQrDeviceJadeStep10": {
94899489
"description": "Jade instruction step 10"
94909490
},
9491+
"importQrDeviceJadeFirmwareWarning": "Assurez-vous que votre appareil est mis à jour avec le dernier firmware",
9492+
"@importQrDeviceJadeFirmwareWarning": {
9493+
"description": "Warning message to update Jade firmware"
9494+
},
94919495
"importQrDeviceKruxName": "Krux",
94929496
"@importQrDeviceKruxName": {
94939497
"description": "Name of Krux device"

0 commit comments

Comments
 (0)