diff --git a/assets/translations/en.json b/assets/translations/en.json index 938cb7992497634b97cf22c7a820553fa3e5eed7..8279bfbde2cd80e565dfa7bc4aa154614f65ab4c 100644 --- a/assets/translations/en.json +++ b/assets/translations/en.json @@ -212,5 +212,9 @@ "indexer": "Indexer", "anAutoNodeChoosed": "A secure and valid node will be automatically used from a random list.", "rootWallet": "Root Wallet", - "blockN": "block N°{}" + "blockN": "block N°{}", + "thisIsNotAGoodCode": "This is not a good code", + "youHaveToBeConnectedToValidateChest": "You have to be connected\nto validate your chest", + "thisIdentityAlreadyExist": "This identity already exists" + } \ No newline at end of file diff --git a/assets/translations/es.json b/assets/translations/es.json index 2cb824b3a48b364d3c180250ba437e035b8727d6..5279a92a51286318fc0ea26dd35a716a5e4ba814 100644 --- a/assets/translations/es.json +++ b/assets/translations/es.json @@ -213,5 +213,8 @@ "indexer": "Indexer", "anAutoNodeChoosed": "Se usará automáticamente un nodo seguro y valido desde una lista aleatoria.", "rootWallet": "Monedero raíz", - "blockN": "bloque N°{}" + "blockN": "bloque N°{}", + "thisIsNotAGoodCode": "Este codígo no es valido", + "youHaveToBeConnectedToValidateChest": "Tienes que tener conneción\npara validar tu cofre", + "thisIdentityAlreadyExist": "Esta identidad ya existe" } diff --git a/assets/translations/fr.json b/assets/translations/fr.json index a1700b8c2412343ed3e64b04bca7f7ab6b110d98..026a3828e52d39c0182d2f28365201f17efcb8cb 100644 --- a/assets/translations/fr.json +++ b/assets/translations/fr.json @@ -212,5 +212,8 @@ "indexer": "Indexer", "anAutoNodeChoosed": "Un noeud sûr et valide sera choisi automatiquement parmis une liste aléatoire.", "rootWallet": "Portefeuille racine", - "blockN": "bloc N°{}" + "blockN": "bloc N°{}", + "thisIsNotAGoodCode": "Ce n'est pas le bon code", + "youHaveToBeConnectedToValidateChest": "Vous devez vous connecter à internet\npour valider votre coffre", + "thisIdentityAlreadyExist": "Cette identité existe déjà" } diff --git a/assets/translations/it.json b/assets/translations/it.json index cf22653c43565a5e0674ecef23340d401b0aabec..b2fa49284dc573d2caae3eda34fbe39abe2a22f3 100644 --- a/assets/translations/it.json +++ b/assets/translations/it.json @@ -215,5 +215,6 @@ "rootWallet": "Portafoglio radice", "blockN": "blocco N°{}", "thisIsNotAGoodCode": "Questo codice non é valido", - "youHaveToBeConnectedToValidateChest": "Vous devez vous connecter à internet\npour valider votre coffre" + "youHaveToBeConnectedToValidateChest": "Vous devez vous connecter à internet\npour valider votre coffre", + "thisIdentityAlreadyExist": "Identitá giá esistente" } \ No newline at end of file diff --git a/integration_test/duniter/data/node.key b/integration_test/duniter/data/node.key new file mode 100644 index 0000000000000000000000000000000000000000..aa131f769f8bad4c8761f8848afdbbaefc5bc702 --- /dev/null +++ b/integration_test/duniter/data/node.key @@ -0,0 +1 @@ +7bd0907a4984e1ab7899edce63b2e286e8f3daad5a8e2bff40cee61ca6b036cd \ No newline at end of file diff --git a/integration_test/utility/general_actions.dart b/integration_test/utility/general_actions.dart index 2bf06f5d613335e58bf01114f6f54a36dc7916b5..d1f3ceaf13bbdef131f6c8009ae26774d16a6083 100644 --- a/integration_test/utility/general_actions.dart +++ b/integration_test/utility/general_actions.dart @@ -1,3 +1,4 @@ +import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; import 'package:flutter_dotenv/flutter_dotenv.dart'; import 'package:flutter_test/flutter_test.dart'; @@ -66,7 +67,7 @@ Future restoreChest() async { await enterText(keyPinForm, 'AAAAA', 0); // Check if string "Accéder à mon coffre" is present in screen - await waitFor('Accéder à mon coffre'); + await waitFor('accessMyChest'.tr()); // Go to wallets home await tapKey(keyGoWalletsHome, duration: 0); @@ -84,7 +85,7 @@ Future restoreChest() async { await tapKey(keyCopyAddress); // Check if string "Cette adresse a été copié" is present in screen - await waitFor('Cette adresse a été copié'); + await waitFor('thisAddressHasBeenCopiedToClipboard'.tr()); // Pop screen 2 time to go back home await goBack(); @@ -126,7 +127,7 @@ Future onboardingNewChest() async { final askedWord = mnemonic[askedWordNumber - 1]; await enterText(keyInputWord, askedWord); - await waitFor('Continuer', exactMatch: true); + await waitFor('continue'.tr(), exactMatch: true); await tapKey(keyGoNext); await tapKey(keyGoNext); await tapKey(keyGoNext); @@ -143,13 +144,13 @@ Future onboardingNewChest() async { await enterText(keyPinForm, 'AAAAA', 0); // Check if string "Accéder à mon coffre" is present in screen - await waitFor('Accéder à mon coffre'); + await waitFor('accessMyChest'.tr()); // Go to wallets home await tapKey(keyGoWalletsHome, duration: 0); // Check if string "Mon portefeuille co" is present in screen - await waitFor('Mon portefeuille co'); + await waitFor('currentWallet'.tr()); await waitFor('0.0', exactMatch: true); // await waitFor('Scanner un'); } diff --git a/lib/providers/wallet_options.dart b/lib/providers/wallet_options.dart index aa68aee28a5ba2000be13d9f154f205bfea4698d..b672ef6228bc277ee4471fa5a68a686d58f9a853 100644 --- a/lib/providers/wallet_options.dart +++ b/lib/providers/wallet_options.dart @@ -178,7 +178,7 @@ class WalletOptionsProvider with ChangeNotifier { ), const SizedBox(height: 10), Consumer<WalletOptionsProvider>(builder: (context, wOptions, _) { - return Text(idtyExist ? 'Cette identité existe déjà' : '', + return Text(idtyExist ? "thisIdentityAlreadyExist".tr() : '', style: TextStyle(color: Colors.red[500])); }) ]), diff --git a/lib/providers/wallets_profiles.dart b/lib/providers/wallets_profiles.dart index 5782ab2b639e25fa0b28cad662d269243bfbe932..2b7ecf0575831acd159cfac505be6781c0a77b00 100644 --- a/lib/providers/wallets_profiles.dart +++ b/lib/providers/wallets_profiles.dart @@ -30,7 +30,7 @@ class WalletsProfilesProvider with ChangeNotifier { try { barcode = await BarcodeScanner.scan(); } catch (e) { - log.e(e); + log.e("BarcodeScanner ERR: $e"); return 'false'; } if (isAddress(barcode.rawContent)) { diff --git a/lib/screens/myWallets/unlocking_wallet.dart b/lib/screens/myWallets/unlocking_wallet.dart index 18ddf30a7122f057b37314f2131bb99a2c8bfb26..6f2b2ceb48e8be4fb581c2720c36038be7d64217 100644 --- a/lib/screens/myWallets/unlocking_wallet.dart +++ b/lib/screens/myWallets/unlocking_wallet.dart @@ -100,7 +100,8 @@ class UnlockingWallet extends StatelessWidget { style: const TextStyle( fontSize: 25, color: Colors.black, - fontWeight: FontWeight.w700), + fontWeight: FontWeight.w700 + ), )), ]), SizedBox(height: 30 * ratio), @@ -111,13 +112,14 @@ class UnlockingWallet extends StatelessWidget { style: const TextStyle( fontSize: 19, color: Colors.black, - fontWeight: FontWeight.w400), + fontWeight: FontWeight.w400 + ), )), SizedBox(height: 30 * ratio), if (!myWalletProvider.isPinValid && !myWalletProvider.isPinLoading) Text( - "Ce n'est pas le bon code".tr(), + "thisIsNotAGoodCode".tr(), style: const TextStyle( color: Colors.red, fontWeight: FontWeight.w500), ), diff --git a/lib/screens/onBoarding/10.dart b/lib/screens/onBoarding/10.dart index 337132ad66165d78332dec59b09ffcb4dcc05827..92eff67b10b13de72a9bae939ef1ba1baae76de9 100644 --- a/lib/screens/onBoarding/10.dart +++ b/lib/screens/onBoarding/10.dart @@ -105,7 +105,7 @@ class OnboardingStepTen extends StatelessWidget { visible: !myWalletProvider.isPinValid && !myWalletProvider.isPinLoading, child: Text( - "Ce n'est pas le bon code".tr(), + "thisIsNotAGoodCode".tr(), style: const TextStyle( color: Colors.red, fontWeight: FontWeight.w500), ), @@ -117,10 +117,10 @@ class OnboardingStepTen extends StatelessWidget { ? pinForm(context, walletOptions, pinLenght, 1, 2) : Row( mainAxisAlignment: MainAxisAlignment.center, - children: const [ + children: [ Text( - 'Vous devez vous connecter à internet\npour valider votre coffre', - style: TextStyle( + "youHaveToBeConnectedToValidateChest".tr(), + style: const TextStyle( fontSize: 20, color: Colors.redAccent, fontWeight: FontWeight.w500, diff --git a/lib/screens/transaction_in_progress.dart b/lib/screens/transaction_in_progress.dart index 77451f62c22fa464af495f6379daa834dfe5a1f8..8e629740f2ead1b514cd6c868a4d7def425bcee4 100644 --- a/lib/screens/transaction_in_progress.dart +++ b/lib/screens/transaction_in_progress.dart @@ -42,6 +42,8 @@ class TransactionInProgress extends StatelessWidget { String actionName = ''; final bool isUdUnit = configBox.get('isUdUnit') ?? false; + log.d("$transType :: $actionName :: $result"); + switch (transType) { case 'pay': { @@ -94,7 +96,6 @@ class TransactionInProgress extends StatelessWidget { { isLoading = false; // jsonResult = json.decode(_result); - log.d(result); if (result.contains('blockHash: ')) { isValid = true; resultText = 'extrinsicValidated'.tr(args: [actionName]); @@ -110,7 +111,7 @@ class TransactionInProgress extends StatelessWidget { } else { exception = exceptionSplit[0]; } - // log.d('expection: $_exception'); + log.d('expection: $exceptionSplit'); switch (exception) { case 'cert.NotRespectCertPeriod': case 'identity.CreatorNotAllowedToCreateIdty': diff --git a/lib/styles.dart b/lib/styles.dart new file mode 100644 index 0000000000000000000000000000000000000000..75ba92579f0b633b93c7099d8207ae916e71f295 --- /dev/null +++ b/lib/styles.dart @@ -0,0 +1,43 @@ +// import 'dart:io'; +import 'package:flutter/material.dart'; +// import 'package:logger/logger.dart'; + +// --- THIS IS WIP --- + +class GeckoStyles { + + TextStyle successBold(List<String> pars) { + return TextStyle( + color: Colors.green.shade600, + fontWeight: FontWeight.bold, + ); + } + + TextStyle success() { + return TextStyle( + color: Colors.green.shade600 + ); + } + + TextStyle error500(List<String> pars) { + return const TextStyle( + fontSize: 20, + color: Colors.redAccent, + fontWeight: FontWeight.w500, + ); + } + + TextStyle error() { + return const TextStyle(fontSize: 20, color: Colors.redAccent); + } + + TextStyle builder(Map<String, dynamic> pars) { + // pars["hola"] = 20; + // //int a = double.tryParse(source) pars["hola"]; + // return const TextStyle( fontSize: double.tryParse(pars["hola"]), + // color: Colors.redAccent, + // fontWeight: FontWeight.w500 + // ); + return const TextStyle(); + } +}