Skip to content

Commit 6f35173

Browse files
authored
Merge pull request #1761 from SatoshiPortal/moar-fixes
Update to latest Flutter Secure Storage
2 parents d41d9e8 + ccf319f commit 6f35173

14 files changed

Lines changed: 37 additions & 26 deletions

File tree

lib/core/storage/storage_locator.dart

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,11 @@ import 'package:get_it/get_it.dart';
1919
class StorageLocator {
2020
static Future<void> registerDatasources(GetIt locator) async {
2121
const secureStorage = FlutterSecureStorage(
22-
aOptions: AndroidOptions(encryptedSharedPreferences: true),
23-
// iOptions: IOSOptions(accessibility: KeychainAccessibility.first_unlock),
22+
aOptions: AndroidOptions(),
23+
iOptions: IOSOptions(
24+
accessibility: KeychainAccessibility.first_unlock_this_device,
25+
// This will ensure that secure storage can be used by background tasks while the phone is locked.
26+
),
2427
);
2528
locator.registerLazySingleton<KeyValueStorageDatasource<String>>(
2629
() => SecureStorageDatasourceImpl(secureStorage),

lib/features/app_startup/ui/app_startup_widget.dart

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import 'package:bb_mobile/core/seed/data/datasources/seed_datasource.dart';
21
import 'package:bb_mobile/core/themes/app_theme.dart';
32
import 'package:bb_mobile/core/utils/build_context_x.dart';
43
import 'package:bb_mobile/core/utils/constants.dart';
@@ -127,11 +126,7 @@ class AppStartupFailureScreen extends StatelessWidget {
127126
subtitle: Padding(
128127
padding: const EdgeInsets.only(top: 8.0),
129128
child: Text(
130-
e is SeedNotFoundException
131-
? hasBackup
132-
? context.loc.appStartupErrorMessageWithBackup
133-
: context.loc.appStartupErrorMessageNoBackup
134-
: e.toString(),
129+
context.loc.appStartupErrorMessage,
135130
style: context.font.bodyMedium?.copyWith(
136131
color: context.appColors.secondary.withValues(
137132
alpha: 0.7,

localization/app_de.arb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -489,6 +489,7 @@
489489
"paySelectRecipient": "Wählen Sie Empfänger",
490490
"payNoActiveWallet": "Keine aktive Brieftasche",
491491
"importQrDeviceKruxStep4": "Klicken Sie auf die Schaltfläche \"Kamera öffnen\"",
492+
"appStartupErrorMessage": "App konnte nicht gestartet werden. Versuchen Sie, die App vollständig zu stoppen und neu zu starten. Wenn der Fehler weiterhin besteht, melden Sie das Problem an den Support und teilen Sie Ihre Protokolle.",
492493
"appStartupErrorMessageWithBackup": "Konnte nicht initialisiert werden. Löschen und neu installieren, um zu beheben.",
493494
"payPasteInvoice": "Paste Invoice",
494495
"labelErrorUnexpected": "Unerwartete Fehler: {message}",

localization/app_en.arb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11212,6 +11212,10 @@
1121211212
"@appStartupErrorTitle": {
1121311213
"description": "Title shown when the app fails to start up properly"
1121411214
},
11215+
"appStartupErrorMessage": "App failed to startup. Try completely stop the app and restart. If the error persists, report the issue to support and share your logs.",
11216+
"@appStartupErrorMessage": {
11217+
"description": "Error message shown when app startup fails"
11218+
},
1121511219
"appStartupErrorMessageWithBackup": "Could not initialize. Delete and reinstall to fix.",
1121611220
"@appStartupErrorMessageWithBackup": {
1121711221
"description": "Error message shown when app startup fails due to seed storage issue and user has a backup"

localization/app_es.arb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3763,6 +3763,7 @@
37633763
"addressViewChangeAddressesComingSoon": "Direcciones de cambio próximamente",
37643764
"addressViewChangeAddressesDescription": "Mostrar direcciones de cambio de la billetera",
37653765
"appStartupErrorTitle": "Error de inicio",
3766+
"appStartupErrorMessage": "La aplicación no pudo iniciarse. Intente detener completamente la aplicación y reiniciar. Si el error persiste, informe el problema al soporte y comparta sus registros.",
37663767
"appStartupErrorMessageWithBackup": "No se pudo inicializar. Elimine y reinstale para solucionar.",
37673768
"appStartupErrorMessageNoBackup": "No se pudo inicializar. Elimine y reinstale para solucionar. Si su frase de recuperación no está respaldada, puede verla en Configuración->Configuración de Bitcoin->Ver frases después de reinstalar.",
37683769
"appStartupContactSupportButton": "Contactar Soporte",

localization/app_fi.arb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3709,6 +3709,7 @@
37093709
"addressViewChangeAddressesComingSoon": "Vaihtoraha-osoitteet tulossa pian",
37103710
"addressViewChangeAddressesDescription": "Näytä lompakon vaihtoraha-osoitteet",
37113711
"appStartupErrorTitle": "Käynnistysvirhe",
3712+
"appStartupErrorMessage": "Sovelluksen käynnistys epäonnistui. Yritä pysäyttää sovellus kokonaan ja käynnistä uudelleen. Jos virhe jatkuu, ilmoita ongelma tukeen ja jaa lokisi.",
37123713
"appStartupErrorMessageWithBackup": "Alustus epäonnistui. Poista ja asenna uudelleen korjataksesi.",
37133714
"appStartupErrorMessageNoBackup": "Alustus epäonnistui. Poista ja asenna uudelleen korjataksesi. Jos siemeniäsi ei ole varmuuskopioitu, voit tarkastella sitä kohdassa Asetukset->Bitcoin-asetukset->Näytä siemenet uudelleenasennuksen jälkeen.",
37143715
"appStartupContactSupportButton": "Ota yhteyttä tukeen",

localization/app_fr.arb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3763,6 +3763,7 @@
37633763
"addressViewChangeAddressesComingSoon": "Adresses de change à venir",
37643764
"addressViewChangeAddressesDescription": "Afficher les adresses de change du portefeuille",
37653765
"appStartupErrorTitle": "Erreur de démarrage",
3766+
"appStartupErrorMessage": "Le démarrage de l'application a échoué. Essayez d'arrêter complètement l'application et de redémarrer. Si l'erreur persiste, signalez le problème au support et partagez vos journaux.",
37663767
"appStartupErrorMessageWithBackup": "Impossible d'initialiser. Supprimez et réinstallez pour corriger.",
37673768
"appStartupErrorMessageNoBackup": "Impossible d'initialiser. Supprimez et réinstallez pour corriger. Si votre phrase de récupération n'est pas sauvegardée, vous pouvez la consulter dans Paramètres->Paramètres Bitcoin->Voir les phrases après la réinstallation.",
37683769
"appStartupContactSupportButton": "Contacter le support",

localization/app_it.arb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -498,6 +498,7 @@
498498
"paySelectRecipient": "Seleziona il destinatario",
499499
"payNoActiveWallet": "Nessun portafoglio attivo",
500500
"importQrDeviceKruxStep4": "Fare clic sul pulsante \"open camera\"",
501+
"appStartupErrorMessage": "Impossibile avviare l'app. Prova a fermare completamente l'app e riavviare. Se l'errore persiste, segnala il problema al supporto e condividi i tuoi log.",
501502
"appStartupErrorMessageWithBackup": "Impossibile inizializzare. Elimina e reinstalla per risolvere.",
502503
"payPasteInvoice": "Fatturato",
503504
"labelErrorUnexpected": "Errore inaspettato: {message}",

localization/app_pt.arb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -496,6 +496,7 @@
496496
"paySelectRecipient": "Selecione o destinatário",
497497
"payNoActiveWallet": "Sem carteira ativa",
498498
"importQrDeviceKruxStep4": "Clique no botão \"Câmera aberta\"",
499+
"appStartupErrorMessage": "Falha ao iniciar o aplicativo. Tente parar completamente o aplicativo e reiniciar. Se o erro persistir, relate o problema ao suporte e compartilhe seus registros.",
499500
"appStartupErrorMessageWithBackup": "Não foi possível inicializar. Exclua e reinstale para corrigir.",
500501
"payPasteInvoice": "Fatura de pasta",
501502
"labelErrorUnexpected": "Erro inesperado: {message}",

localization/app_ru.arb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -496,6 +496,7 @@
496496
"paySelectRecipient": "Выберите получателя",
497497
"payNoActiveWallet": "Нет активного кошелька",
498498
"importQrDeviceKruxStep4": "Нажмите кнопку «открытая камера»",
499+
"appStartupErrorMessage": "Приложение не удалось запустить. Попробуйте полностью остановить приложение и перезапустить. Если ошибка сохраняется, сообщите о проблеме в службу поддержки и поделитесь своими журналами.",
499500
"appStartupErrorMessageWithBackup": "Не удалось инициализировать. Удалите и переустановите, чтобы исправить.",
500501
"payPasteInvoice": "Счет-фактура",
501502
"labelErrorUnexpected": "Неожиданная ошибка: {message}",

0 commit comments

Comments
 (0)