diff --git a/assets/images/2.0x/pre_seed_dark.png b/assets/images/2.0x/pre_seed_dark.png new file mode 100755 index 000000000..2bb3b8e65 Binary files /dev/null and b/assets/images/2.0x/pre_seed_dark.png differ diff --git a/assets/images/2.0x/pre_seed_light.png b/assets/images/2.0x/pre_seed_light.png new file mode 100755 index 000000000..b198effad Binary files /dev/null and b/assets/images/2.0x/pre_seed_light.png differ diff --git a/assets/images/3.0x/pre_seed_dark.png b/assets/images/3.0x/pre_seed_dark.png new file mode 100755 index 000000000..632f2bb1e Binary files /dev/null and b/assets/images/3.0x/pre_seed_dark.png differ diff --git a/assets/images/3.0x/pre_seed_light.png b/assets/images/3.0x/pre_seed_light.png new file mode 100755 index 000000000..329fce10b Binary files /dev/null and b/assets/images/3.0x/pre_seed_light.png differ diff --git a/assets/images/pre_seed_dark.png b/assets/images/pre_seed_dark.png new file mode 100755 index 000000000..ed12c730a Binary files /dev/null and b/assets/images/pre_seed_dark.png differ diff --git a/assets/images/pre_seed_light.png b/assets/images/pre_seed_light.png new file mode 100755 index 000000000..bb95a6567 Binary files /dev/null and b/assets/images/pre_seed_light.png differ diff --git a/lib/core/address_validator.dart b/lib/core/address_validator.dart index ccc8b83ab..c0eae3189 100644 --- a/lib/core/address_validator.dart +++ b/lib/core/address_validator.dart @@ -60,7 +60,7 @@ class AddressValidator extends TextValidator { case CryptoCurrency.bnb: return [42]; case CryptoCurrency.btc: - return [33, 34, 42]; + return [33, 34, 42, 62]; case CryptoCurrency.dai: return [42]; case CryptoCurrency.dash: diff --git a/lib/di.dart b/lib/di.dart index 1571c925b..69b48056c 100644 --- a/lib/di.dart +++ b/lib/di.dart @@ -21,6 +21,7 @@ import 'package:cake_wallet/src/screens/nodes/nodes_list_page.dart'; import 'package:cake_wallet/src/screens/pin_code/pin_code_widget.dart'; import 'package:cake_wallet/src/screens/rescan/rescan_page.dart'; import 'package:cake_wallet/src/screens/restore/wallet_restore_page.dart'; +import 'package:cake_wallet/src/screens/seed/pre_seed_page.dart'; import 'package:cake_wallet/src/screens/seed/wallet_seed_page.dart'; import 'package:cake_wallet/src/screens/send/send_template_page.dart'; import 'package:cake_wallet/src/screens/settings/change_language.dart'; @@ -405,4 +406,6 @@ Future setup( transactionInfo, getIt.get().shouldSaveRecipientAddress, transactionDescriptionBox)); + + getIt.registerFactory(() => PreSeedPage()); } diff --git a/lib/router.dart b/lib/router.dart index acad61d04..e9174e694 100644 --- a/lib/router.dart +++ b/lib/router.dart @@ -2,6 +2,7 @@ import 'package:cake_wallet/entities/contact_record.dart'; import 'package:cake_wallet/entities/transaction_description.dart'; import 'package:cake_wallet/src/screens/pin_code/pin_code_widget.dart'; import 'package:cake_wallet/src/screens/restore/wallet_restore_page.dart'; +import 'package:cake_wallet/src/screens/seed/pre_seed_page.dart'; import 'package:cake_wallet/store/settings_store.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; @@ -64,14 +65,14 @@ Route createRoute(RouteSettings settings) { (PinCodeState context, dynamic _) async { try { context.changeProcessText( - 'Creating new wallet'); // FIXME: Unnamed constant + S.current.creating_new_wallet); final newWalletVM = getIt.get(param1: WalletType.monero); await newWalletVM.create( options: 'English'); // FIXME: Unnamed constant context.hideProgressText(); await Navigator.of(context.context) - .pushNamed(Routes.seed, arguments: true); + .pushNamed(Routes.preSeed); } catch (e) { context.changeProcessText('Error: ${e.toString()}'); } @@ -322,6 +323,10 @@ Route createRoute(RouteSettings settings) { return MaterialPageRoute( builder: (_) => getIt.get()); + case Routes.preSeed: + return MaterialPageRoute( + builder: (_) => getIt.get()); + default: return MaterialPageRoute( builder: (_) => Scaffold( diff --git a/lib/routes.dart b/lib/routes.dart index 13a365990..a9c9a5b34 100644 --- a/lib/routes.dart +++ b/lib/routes.dart @@ -47,4 +47,5 @@ class Routes { static const exchangeTemplate = '/exchange_template'; static const restoreWalletType = '/restore_wallet_type'; static const restoreWallet = '/restore_wallet'; + static const preSeed = '/pre_seed'; } \ No newline at end of file diff --git a/lib/src/screens/dashboard/widgets/address_page.dart b/lib/src/screens/dashboard/widgets/address_page.dart index c50b1b566..a31269a2b 100644 --- a/lib/src/screens/dashboard/widgets/address_page.dart +++ b/lib/src/screens/dashboard/widgets/address_page.dart @@ -39,7 +39,7 @@ class AddressPage extends StatelessWidget { mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ Text( - S.of(context).addresses, + S.of(context).accounts_subaddresses, style: TextStyle( fontSize: 14, fontWeight: FontWeight.w500, diff --git a/lib/src/screens/receive/widgets/qr_widget.dart b/lib/src/screens/receive/widgets/qr_widget.dart index ba2101d93..e94351266 100644 --- a/lib/src/screens/receive/widgets/qr_widget.dart +++ b/lib/src/screens/receive/widgets/qr_widget.dart @@ -52,19 +52,9 @@ class QRWidget extends StatelessWidget { ))))), Spacer(flex: 3) ]), - Padding( - padding: EdgeInsets.only(top: 20), - child: Text( - S.of(context).scan_qr_code, - style: TextStyle( - fontSize: 12, - fontWeight: FontWeight.w500, - color: Theme.of(context).indicatorColor), - ), - ), isAmountFieldShow ? Padding( - padding: EdgeInsets.only(top: 40), + padding: EdgeInsets.only(top: 60), child: Row( children: [ Expanded( diff --git a/lib/src/screens/seed/pre_seed_page.dart b/lib/src/screens/seed/pre_seed_page.dart new file mode 100644 index 000000000..6f552758d --- /dev/null +++ b/lib/src/screens/seed/pre_seed_page.dart @@ -0,0 +1,72 @@ +import 'package:cake_wallet/di.dart'; +import 'package:cake_wallet/routes.dart'; +import 'package:cake_wallet/store/settings_store.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:cake_wallet/generated/i18n.dart'; +import 'package:cake_wallet/src/widgets/primary_button.dart'; +import 'package:cake_wallet/src/screens/base_page.dart'; + +class PreSeedPage extends BasePage { + static final imageLight = Image.asset('assets/images/pre_seed_light.png'); + static final imageDark = Image.asset('assets/images/pre_seed_dark.png'); + + @override + Widget leading(BuildContext context) => null; + + @override + String get title => S.current.pre_seed_title; + + @override + Widget body(BuildContext context) { + final image = + getIt.get().isDarkTheme ? imageDark : imageLight; + + return Container( + padding: EdgeInsets.all(24), + child: Column( + children: [ + Flexible( + flex: 2, + child: AspectRatio( + aspectRatio: 1, + child: FittedBox(child: image, fit: BoxFit.contain))), + Flexible( + flex: 3, + child: Column( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Padding( + padding: + EdgeInsets.only(top: 70, left: 16, right: 16), + child: Text( + S.of(context).pre_seed_description, + textAlign: TextAlign.center, + style: TextStyle( + fontSize: 14, + fontWeight: FontWeight.normal, + color: Theme.of(context) + .primaryTextTheme + .caption + .color), + ), + ), + PrimaryButton( + onPressed: () => + Navigator.of(context).popAndPushNamed(Routes.seed, + arguments: true), + text: S.of(context).pre_seed_button_text, + color: Theme.of(context) + .accentTextTheme + .body2 + .color, + textColor: Colors.white) + ], + ) + ) + ], + ), + ); + } + +} \ No newline at end of file diff --git a/lib/src/screens/wallet_list/wallet_list_page.dart b/lib/src/screens/wallet_list/wallet_list_page.dart index 5162b1c5b..1b15a8e0e 100644 --- a/lib/src/screens/wallet_list/wallet_list_page.dart +++ b/lib/src/screens/wallet_list/wallet_list_page.dart @@ -243,7 +243,7 @@ class WalletListBodyState extends State { changeProcessText(S.of(context).creating_new_wallet); await widget.walletListViewModel.walletNewVM.create(options: 'English'); // FIXME: Unnamed constant hideProgressText(); - await Navigator.of(context).pushNamed(Routes.seed, arguments: true); + await Navigator.of(context).pushNamed(Routes.preSeed); } catch(e) { changeProcessText(S.of(context).creating_new_wallet_error(e.toString())); } diff --git a/res/values/strings_de.arb b/res/values/strings_de.arb index 29df39a73..48a2bb674 100644 --- a/res/values/strings_de.arb +++ b/res/values/strings_de.arb @@ -414,5 +414,9 @@ "exchange_sync_alert_content" : "Bitte warten Sie, bis Ihre Brieftasche synchronisiert ist", + "pre_seed_title" : "WICHTIG", + "pre_seed_description" : "Auf der nächsten Seite sehen Sie eine Reihe von 25 Wörtern. Dies ist Ihr einzigartiger und privater Samen und der EINZIGE Weg, um Ihren Geldbeutel im Falle eines Verlusts oder einer Fehlfunktion wiederherzustellen. Es liegt in IHRER Verantwortung, es aufzuschreiben und an einem sicheren Ort außerhalb der Cake Wallet App aufzubewahren.", + "pre_seed_button_text" : "Ich verstehe. Zeig mir meinen Samen", + "use_ssl" : "Verwenden Sie SSL" } \ No newline at end of file diff --git a/res/values/strings_en.arb b/res/values/strings_en.arb index 8dfe7bcfb..d0b620bf5 100644 --- a/res/values/strings_en.arb +++ b/res/values/strings_en.arb @@ -414,5 +414,9 @@ "exchange_sync_alert_content" : "Please wait until your wallet is synchronized", + "pre_seed_title" : "IMPORTANT", + "pre_seed_description" : "On the next page you will see a series of 25 words. This is your unique and private seed and it is the ONLY way to recover your wallet in case of loss or malfunction. It is YOUR responsibility to write it down and store it in a safe place outside of the Cake Wallet app.", + "pre_seed_button_text" : "I understand. Show me my seed", + "use_ssl" : "Use SSL" } \ No newline at end of file diff --git a/res/values/strings_es.arb b/res/values/strings_es.arb index 55a0b0306..db685e024 100644 --- a/res/values/strings_es.arb +++ b/res/values/strings_es.arb @@ -414,5 +414,9 @@ "exchange_sync_alert_content" : "Espere hasta que su billetera esté sincronizada", + "pre_seed_title" : "IMPORTANTE", + "pre_seed_description" : "En la página siguiente verá una serie de 25 palabras. Esta es su semilla única y privada y es la ÚNICA forma de recuperar su billetera en caso de pérdida o mal funcionamiento. Es SU responsabilidad escribirlo y guardarlo en un lugar seguro fuera de la aplicación Cake Wallet.", + "pre_seed_button_text" : "Entiendo. Muéstrame mi semilla", + "use_ssl" : "Utilice SSL" } \ No newline at end of file diff --git a/res/values/strings_hi.arb b/res/values/strings_hi.arb index 6584c18d1..ea3cf1b26 100644 --- a/res/values/strings_hi.arb +++ b/res/values/strings_hi.arb @@ -414,5 +414,9 @@ "exchange_sync_alert_content" : "कृपया प्रतीक्षा करें जब तक आपका बटुआ सिंक्रनाइज़ नहीं किया जाता है", + "pre_seed_title" : "महत्वपूर्ण", + "pre_seed_description" : "अगले पेज पर आपको 25 शब्दों की एक श्रृंखला दिखाई देगी। यह आपका अद्वितीय और निजी बीज है और नुकसान या खराबी के मामले में अपने बटुए को पुनर्प्राप्त करने का एकमात्र तरीका है। यह आपकी जिम्मेदारी है कि इसे नीचे लिखें और इसे Cake Wallet ऐप के बाहर सुरक्षित स्थान पर संग्रहीत करें।", + "pre_seed_button_text" : "मै समझता हुँ। मुझे अपना बीज दिखाओ", + "use_ssl" : "उपयोग SSL" } \ No newline at end of file diff --git a/res/values/strings_ja.arb b/res/values/strings_ja.arb index 460a8a426..26518bf33 100644 --- a/res/values/strings_ja.arb +++ b/res/values/strings_ja.arb @@ -414,5 +414,9 @@ "exchange_sync_alert_content" : "ウォレットが同期されるまでお待ちください", + "pre_seed_title" : "重要", + "pre_seed_description" : "次のページでは、一連の25語が表示されます。 これはあなたのユニークでプライベートなシードであり、紛失や誤動作が発生した場合にウォレットを回復する唯一の方法です。 それを書き留めて、Cake Wallet アプリの外の安全な場所に保管するのはあなたの責任です。", + "pre_seed_button_text" : "わかります。 種を見せて", + "use_ssl" : "SSLを使用する" } \ No newline at end of file diff --git a/res/values/strings_ko.arb b/res/values/strings_ko.arb index edc2a385c..3f11dd705 100644 --- a/res/values/strings_ko.arb +++ b/res/values/strings_ko.arb @@ -414,5 +414,9 @@ "exchange_sync_alert_content" : "지갑이 동기화 될 때까지 기다리십시오", + "pre_seed_title" : "중대한", + "pre_seed_description" : "다음 페이지에서 25 개의 단어를 볼 수 있습니다. 이것은 귀하의 고유하고 개인적인 시드이며 분실 또는 오작동시 지갑을 복구하는 유일한 방법입니다. 기록해두고 Cake Wallet 앱 외부의 안전한 장소에 보관하는 것은 귀하의 책임입니다.", + "pre_seed_button_text" : "이해 했어요. 내 씨앗을 보여줘", + "use_ssl" : "SSL 사용" } \ No newline at end of file diff --git a/res/values/strings_nl.arb b/res/values/strings_nl.arb index 133533c97..e6edeaf44 100644 --- a/res/values/strings_nl.arb +++ b/res/values/strings_nl.arb @@ -414,5 +414,9 @@ "exchange_sync_alert_content" : "Wacht tot uw portemonnee is gesynchroniseerd", + "pre_seed_title" : "BELANGRIJK", + "pre_seed_description" : "Op de volgende pagina ziet u een reeks van 25 woorden. Dit is uw unieke en persoonlijke zaadje en het is de ENIGE manier om uw portemonnee te herstellen in geval van verlies of storing. Het is JOUW verantwoordelijkheid om het op te schrijven en op een veilige plaats op te slaan buiten de Cake Wallet app.", + "pre_seed_button_text" : "Ik begrijp het. Laat me mijn zaad zien", + "use_ssl" : "Gebruik SSL" } \ No newline at end of file diff --git a/res/values/strings_pl.arb b/res/values/strings_pl.arb index c33c24598..f2bac8205 100644 --- a/res/values/strings_pl.arb +++ b/res/values/strings_pl.arb @@ -414,5 +414,9 @@ "exchange_sync_alert_content" : "Poczekaj, aż portfel zostanie zsynchronizowany", + "pre_seed_title" : "WAŻNY", + "pre_seed_description" : "Na następnej stronie zobaczysz serię 25 słów. To jest Twoje unikalne i prywatne ziarno i jest to JEDYNY sposób na odzyskanie portfela w przypadku utraty lub awarii. Twoim obowiązkiem jest zapisanie go i przechowywanie w bezpiecznym miejscu poza aplikacją Cake Wallet.", + "pre_seed_button_text" : "Rozumiem. Pokaż mi moje nasienie", + "use_ssl" : "Użyj SSL" } \ No newline at end of file diff --git a/res/values/strings_pt.arb b/res/values/strings_pt.arb index c640d40a0..97d08aedf 100644 --- a/res/values/strings_pt.arb +++ b/res/values/strings_pt.arb @@ -414,5 +414,9 @@ "exchange_sync_alert_content" : "Por favor, espere até que sua carteira seja sincronizada", + "pre_seed_title" : "IMPORTANTE", + "pre_seed_description" : "Na próxima página, você verá uma série de 25 palavras. Esta é a sua semente única e privada e é a ÚNICA maneira de recuperar sua carteira em caso de perda ou mau funcionamento. É SUA responsabilidade anotá-lo e armazená-lo em um local seguro fora do aplicativo Cake Wallet.", + "pre_seed_button_text" : "Compreendo. Me mostre minha semente", + "use_ssl" : "Use SSL" } diff --git a/res/values/strings_ru.arb b/res/values/strings_ru.arb index d75693189..68001adc6 100644 --- a/res/values/strings_ru.arb +++ b/res/values/strings_ru.arb @@ -414,5 +414,9 @@ "exchange_sync_alert_content" : "Подождите, пока ваш кошелек синхронизируется", + "pre_seed_title" : "ВАЖНО", + "pre_seed_description" : "На следующей странице вы увидите серию из 25 слов. Это ваша уникальная и личная мнемоническая фраза, и это ЕДИНСТВЕННЫЙ способ восстановить свой кошелек в случае потери или неисправности. ВАМ необходимо записать ее и хранить в надежном месте вне приложения Cake Wallet.", + "pre_seed_button_text" : "Понятно. Покажите мнемоническую фразу", + "use_ssl" : "Использовать SSL" } \ No newline at end of file diff --git a/res/values/strings_uk.arb b/res/values/strings_uk.arb index 90a515c73..0aef52a46 100644 --- a/res/values/strings_uk.arb +++ b/res/values/strings_uk.arb @@ -414,5 +414,9 @@ "exchange_sync_alert_content" : "Зачекайте, поки ваш гаманець не синхронізується", + "pre_seed_title" : "ВАЖЛИВО", + "pre_seed_description" : "На наступній сторінці ви побачите серію з 25 слів. Це ваша унікальна та приватна мнемонічна фраза, і це ЄДИНИЙ спосіб відновити ваш гаманець на випадок втрати або несправності. ВАМ необхідно записати її та зберігати в безпечному місці поза програмою Cake Wallet.", + "pre_seed_button_text" : "Зрозуміло. Покажіть мнемонічну фразу", + "use_ssl" : "Використати SSL" } \ No newline at end of file diff --git a/res/values/strings_zh.arb b/res/values/strings_zh.arb index 0f6f88de0..c20e97a4a 100644 --- a/res/values/strings_zh.arb +++ b/res/values/strings_zh.arb @@ -414,5 +414,9 @@ "exchange_sync_alert_content" : "請等待,直到您的錢包同步", + "pre_seed_title" : "重要", + "pre_seed_description" : "在下一頁上,您將看到一系列25個單詞。 這是您獨特的私人種子,是丟失或出現故障時恢復錢包的唯一方法。 您有責任將其寫下並存儲在Cake Wallet應用程序外部的安全地方。", + "pre_seed_button_text" : "我明白。 給我看我的種子", + "use_ssl" : "使用SSL" } \ No newline at end of file