diff --git a/lib/bitcoin/bitcoin_balance.dart b/lib/bitcoin/bitcoin_balance.dart index 1f5a70b72..3cc66bfe8 100644 --- a/lib/bitcoin/bitcoin_balance.dart +++ b/lib/bitcoin/bitcoin_balance.dart @@ -27,7 +27,8 @@ class BitcoinBalance extends Balance { final int confirmed; final int unconfirmed; - int get total => confirmed + unconfirmed; + int get total => + confirmed + (unconfirmed < 0 ? unconfirmed * -1 : unconfirmed); int get availableBalance => confirmed + (unconfirmed < 0 ? unconfirmed : 0); diff --git a/lib/bitcoin/bitcoin_wallet.dart b/lib/bitcoin/bitcoin_wallet.dart index eaf5d2864..052440f1e 100644 --- a/lib/bitcoin/bitcoin_wallet.dart +++ b/lib/bitcoin/bitcoin_wallet.dart @@ -319,7 +319,10 @@ abstract class BitcoinWalletBase extends WalletBase with Store { return PendingBitcoinTransaction(txb.build(), eclient: eclient, amount: amount, fee: fee) - ..addListener((transaction) => transactionHistory.addOne(transaction)); + ..addListener((transaction) async { + transactionHistory.addOne(transaction); + await _updateBalance(); + }); } String toJSON() => json.encode({ diff --git a/lib/di.dart b/lib/di.dart index 855ee719a..c97b37f5c 100644 --- a/lib/di.dart +++ b/lib/di.dart @@ -428,7 +428,8 @@ Future setup( (para1, param2) => NewWalletTypePage(getIt.get(), onTypeSelected: para1, isNewWallet: param2)); - getIt.registerFactory(() => PreSeedPage()); + getIt.registerFactoryParam( + (WalletType type, _) => PreSeedPage(type)); getIt.registerFactoryParam((trade, _) => TradeDetailsViewModel(tradeForDetails: trade, trades: tradesSource)); diff --git a/lib/entities/preferences_key.dart b/lib/entities/preferences_key.dart index f9bf224f8..c2d6427c9 100644 --- a/lib/entities/preferences_key.dart +++ b/lib/entities/preferences_key.dart @@ -10,6 +10,7 @@ class PreferencesKey { static const allowBiometricalAuthenticationKey = 'allow_biometrical_authentication'; static const currentTheme = 'current_theme'; + static const isDarkThemeLegacy = 'dark_theme'; static const displayActionListModeKey = 'display_list_mode'; static const currentPinLength = 'current_pin_length'; static const currentLanguageCode = 'language_code'; diff --git a/lib/generated/i18n.dart b/lib/generated/i18n.dart index 106b786b7..59799342b 100644 --- a/lib/generated/i18n.dart +++ b/lib/generated/i18n.dart @@ -143,7 +143,7 @@ class S implements WidgetsLocalizations { String get please_select => "Please select:"; String get please_try_to_connect_to_another_node => "Please try to connect to another node"; String get pre_seed_button_text => "I understand. Show me my seed"; - String get 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."; + String pre_seed_description(int words) => "On the next page you will see a series of ${words} 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."; String get pre_seed_title => "IMPORTANT"; String get private_key => "Private key"; String get public_key => "Public key"; @@ -259,7 +259,7 @@ class S implements WidgetsLocalizations { String get subaddresses => "Subaddresses"; String get sync_status_connected => "CONNECTED"; String get sync_status_connecting => "CONNECTING"; - String get sync_status_failed_connect => "FAILED CONNECT TO THE NODE"; + String get sync_status_failed_connect => "DISCONNECTED"; String get sync_status_not_connected => "NOT CONNECTED"; String get sync_status_starting_sync => "STARTING SYNC"; String get sync_status_syncronized => "SYNCHRONIZED"; @@ -514,7 +514,7 @@ class $de extends S { @override String get choose_wallet_currency => "Bitte wählen Sie die Brieftaschenwährung:"; @override - String get 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."; + String pre_seed_description(int words) => "Auf der nächsten Seite sehen Sie eine Reihe von ${words} 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."; @override String get node_connection_successful => "Die Verbindung war erfolgreich"; @override @@ -600,7 +600,7 @@ class $de extends S { @override String get exchange => "Austausch"; @override - String get sync_status_failed_connect => "Verbindung zum Knoten fehlgeschlagen"; + String get sync_status_failed_connect => "GETRENNT"; @override String get send_estimated_fee => "Geschätzte Gebühr:"; @override @@ -1214,7 +1214,7 @@ class $hi extends S { @override String get choose_wallet_currency => "कृपया बटुआ मुद्रा चुनें:"; @override - String get pre_seed_description => "अगले पेज पर आपको 25 शब्दों की एक श्रृंखला दिखाई देगी। यह आपका अद्वितीय और निजी बीज है और नुकसान या खराबी के मामले में अपने बटुए को पुनर्प्राप्त करने का एकमात्र तरीका है। यह आपकी जिम्मेदारी है कि इसे नीचे लिखें और इसे Cake Wallet ऐप के बाहर सुरक्षित स्थान पर संग्रहीत करें।"; + String pre_seed_description(int words) => "अगले पेज पर आपको ${words} शब्दों की एक श्रृंखला दिखाई देगी। यह आपका अद्वितीय और निजी बीज है और नुकसान या खराबी के मामले में अपने बटुए को पुनर्प्राप्त करने का एकमात्र तरीका है। यह आपकी जिम्मेदारी है कि इसे नीचे लिखें और इसे Cake Wallet ऐप के बाहर सुरक्षित स्थान पर संग्रहीत करें।"; @override String get node_connection_successful => "कनेक्शन सफल रहा"; @override @@ -1300,7 +1300,7 @@ class $hi extends S { @override String get exchange => "अदला बदली"; @override - String get sync_status_failed_connect => "फेल हुआ कनेक्ट नोड"; + String get sync_status_failed_connect => "डिस्कनेक्ट किया गया"; @override String get send_estimated_fee => "अनुमानित शुल्क:"; @override @@ -1914,7 +1914,7 @@ class $ru extends S { @override String get choose_wallet_currency => "Пожалуйста, выберите валюту кошелька:"; @override - String get pre_seed_description => "На следующей странице вы увидите серию из 25 слов. Это ваша уникальная и личная мнемоническая фраза, и это ЕДИНСТВЕННЫЙ способ восстановить свой кошелек в случае потери или неисправности. ВАМ необходимо записать ее и хранить в надежном месте вне приложения Cake Wallet."; + String pre_seed_description(int words) => "На следующей странице вы увидите серию из ${words} слов. Это ваша уникальная и личная мнемоническая фраза, и это ЕДИНСТВЕННЫЙ способ восстановить свой кошелек в случае потери или неисправности. ВАМ необходимо записать ее и хранить в надежном месте вне приложения Cake Wallet."; @override String get node_connection_successful => "Подключение прошло успешно"; @override @@ -2000,7 +2000,7 @@ class $ru extends S { @override String get exchange => "Обмен"; @override - String get sync_status_failed_connect => "ОШИБКА ПОДКЛЮЧЕНИЯ К НОДЕ"; + String get sync_status_failed_connect => "ОТКЛЮЧЕНО"; @override String get send_estimated_fee => "Предполагаемая комиссия:"; @override @@ -2614,7 +2614,7 @@ class $ko extends S { @override String get choose_wallet_currency => "지갑 통화를 선택하십시오:"; @override - String get pre_seed_description => "다음 페이지에서 25 개의 단어를 볼 수 있습니다. 이것은 귀하의 고유하고 개인적인 시드이며 분실 또는 오작동시 지갑을 복구하는 유일한 방법입니다. 기록해두고 Cake Wallet 앱 외부의 안전한 장소에 보관하는 것은 귀하의 책임입니다."; + String pre_seed_description(int words) => "다음 페이지에서 ${words} 개의 단어를 볼 수 있습니다. 이것은 귀하의 고유하고 개인적인 시드이며 분실 또는 오작동시 지갑을 복구하는 유일한 방법입니다. 기록해두고 Cake Wallet 앱 외부의 안전한 장소에 보관하는 것은 귀하의 책임입니다."; @override String get node_connection_successful => "성공적으로 연결되었습니다."; @override @@ -2700,7 +2700,7 @@ class $ko extends S { @override String get exchange => "교환"; @override - String get sync_status_failed_connect => "노드에 연결하지 못했습니다"; + String get sync_status_failed_connect => "연결 해제"; @override String get send_estimated_fee => "예상 수수료:"; @override @@ -3314,7 +3314,7 @@ class $pt extends S { @override String get choose_wallet_currency => "Escolha a moeda da carteira:"; @override - String get 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."; + String pre_seed_description(int words) => "Na próxima página, você verá uma série de ${words} 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."; @override String get node_connection_successful => "A conexão foi bem sucedida"; @override @@ -3400,7 +3400,7 @@ class $pt extends S { @override String get exchange => "Trocar"; @override - String get sync_status_failed_connect => "Erro ao conectar com o nó"; + String get sync_status_failed_connect => "DESCONECTADO"; @override String get send_estimated_fee => "Taxa estimada:"; @override @@ -4014,7 +4014,7 @@ class $uk extends S { @override String get choose_wallet_currency => "Будь ласка, виберіть валюту гаманця:"; @override - String get pre_seed_description => "На наступній сторінці ви побачите серію з 25 слів. Це ваша унікальна та приватна мнемонічна фраза, і це ЄДИНИЙ спосіб відновити ваш гаманець на випадок втрати або несправності. ВАМ необхідно записати її та зберігати в безпечному місці поза програмою Cake Wallet."; + String pre_seed_description(int words) => "На наступній сторінці ви побачите серію з ${words} слів. Це ваша унікальна та приватна мнемонічна фраза, і це ЄДИНИЙ спосіб відновити ваш гаманець на випадок втрати або несправності. ВАМ необхідно записати її та зберігати в безпечному місці поза програмою Cake Wallet."; @override String get node_connection_successful => "З'єднання було успішним"; @override @@ -4100,7 +4100,7 @@ class $uk extends S { @override String get exchange => "Обмін"; @override - String get sync_status_failed_connect => "ПОМИЛКА ПІДКЛЮЧЕННЯ ДО ВУЗЛУ"; + String get sync_status_failed_connect => "ВІДКЛЮЧЕНО"; @override String get send_estimated_fee => "Ймовірна комісія:"; @override @@ -4714,7 +4714,7 @@ class $ja extends S { @override String get choose_wallet_currency => "ウォレット通貨を選択してください:"; @override - String get pre_seed_description => "次のページでは、一連の25語が表示されます。 これはあなたのユニークでプライベートなシードであり、紛失や誤動作が発生した場合にウォレットを回復する唯一の方法です。 それを書き留めて、Cake Wallet アプリの外の安全な場所に保管するのはあなたの責任です。"; + String pre_seed_description(int words) => "次のページでは、一連の${words}語が表示されます。 これはあなたのユニークでプライベートなシードであり、紛失や誤動作が発生した場合にウォレットを回復する唯一の方法です。 それを書き留めて、Cake Wallet アプリの外の安全な場所に保管するのはあなたの責任です。"; @override String get node_connection_successful => "接続に成功しました"; @override @@ -4800,7 +4800,7 @@ class $ja extends S { @override String get exchange => "交換する"; @override - String get sync_status_failed_connect => "ノードへの接続に失敗しました"; + String get sync_status_failed_connect => "切断されました"; @override String get send_estimated_fee => "見積手数料:"; @override @@ -5418,7 +5418,7 @@ class $pl extends S { @override String get choose_wallet_currency => "Wybierz walutę portfela:"; @override - String get 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."; + String pre_seed_description(int words) => "Na następnej stronie zobaczysz serię ${words} 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."; @override String get node_connection_successful => "Połączenie powiodło się"; @override @@ -5504,7 +5504,7 @@ class $pl extends S { @override String get exchange => "Wymieniać się"; @override - String get sync_status_failed_connect => "NIE MOŻNA PODŁĄCZYĆ DO WĘZŁA"; + String get sync_status_failed_connect => "NIEPOWIĄZANY"; @override String get send_estimated_fee => "Szacowana opłata:"; @override @@ -6118,7 +6118,7 @@ class $es extends S { @override String get choose_wallet_currency => "Por favor, elija la moneda de la billetera:"; @override - String get 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."; + String pre_seed_description(int words) => "En la página siguiente verá una serie de ${words} 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."; @override String get node_connection_successful => "La conexión fue exitosa"; @override @@ -6204,7 +6204,7 @@ class $es extends S { @override String get exchange => "Intercambiar"; @override - String get sync_status_failed_connect => "CONEXIÓN FALLIDA AL NODO"; + String get sync_status_failed_connect => "DESCONECTADO"; @override String get send_estimated_fee => "Tarifa estimada:"; @override @@ -6818,7 +6818,7 @@ class $nl extends S { @override String get choose_wallet_currency => "Kies een portemonnee-valuta:"; @override - String get 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."; + String pre_seed_description(int words) => "Op de volgende pagina ziet u een reeks van ${words} 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."; @override String get node_connection_successful => "Verbinding is gelukt"; @override @@ -6904,7 +6904,7 @@ class $nl extends S { @override String get exchange => "Uitwisseling"; @override - String get sync_status_failed_connect => "MISLUKT VERBINDING MET DE NODE"; + String get sync_status_failed_connect => "LOSGEKOPPELD"; @override String get send_estimated_fee => "Geschatte vergoeding:"; @override @@ -7518,7 +7518,7 @@ class $zh extends S { @override String get choose_wallet_currency => "請選擇錢包貨幣:"; @override - String get pre_seed_description => "在下一頁上,您將看到一系列25個單詞。 這是您獨特的私人種子,是丟失或出現故障時恢復錢包的唯一方法。 您有責任將其寫下並存儲在Cake Wallet應用程序外部的安全地方。"; + String pre_seed_description(int words) => "在下一頁上,您將看到一系列${words}個單詞。 這是您獨特的私人種子,是丟失或出現故障時恢復錢包的唯一方法。 您有責任將其寫下並存儲在Cake Wallet應用程序外部的安全地方。"; @override String get node_connection_successful => "連接成功"; @override @@ -7604,7 +7604,7 @@ class $zh extends S { @override String get exchange => "交换"; @override - String get sync_status_failed_connect => "无法连接到节点"; + String get sync_status_failed_connect => "斷線"; @override String get send_estimated_fee => "预估费用:"; @override diff --git a/lib/router.dart b/lib/router.dart index e06f43635..69cfb9eff 100644 --- a/lib/router.dart +++ b/lib/router.dart @@ -71,8 +71,9 @@ Route createRoute(RouteSettings settings) { case Routes.newWalletType: return CupertinoPageRoute( builder: (_) => getIt.get( - param1: (BuildContext context, WalletType _) => - Navigator.of(context).pushNamed(Routes.preSeed, arguments: true), + param1: (BuildContext context, WalletType type) => + Navigator.of(context) + .pushNamed(Routes.preSeed, arguments: type), param2: true)); case Routes.newWallet: @@ -137,7 +138,8 @@ Route createRoute(RouteSettings settings) { return CupertinoPageRoute( builder: (_) => getIt.get( param1: (PinCodeState context, dynamic _) => - Navigator.pushNamed(context.context, Routes.restoreWalletType)), + Navigator.pushNamed( + context.context, Routes.restoreWalletType)), fullscreenDialog: true); case Routes.seed: @@ -147,8 +149,8 @@ Route createRoute(RouteSettings settings) { case Routes.restoreWallet: return MaterialPageRoute( - builder: (_) => - getIt.get(param1: settings.arguments as WalletType)); + builder: (_) => getIt.get( + param1: settings.arguments as WalletType)); case Routes.restoreWalletFromSeed: final type = settings.arguments as WalletType; @@ -248,7 +250,7 @@ Route createRoute(RouteSettings settings) { case Routes.accountCreation: return CupertinoPageRoute( builder: (_) => getIt.get( - param1: settings.arguments as AccountListItem)); + param1: settings.arguments as AccountListItem)); case Routes.addressBook: return MaterialPageRoute( @@ -312,7 +314,8 @@ Route createRoute(RouteSettings settings) { case Routes.preSeed: return MaterialPageRoute( - builder: (_) => getIt.get()); + builder: (_) => + getIt.get(param1: settings.arguments as WalletType)); default: return MaterialPageRoute( diff --git a/lib/src/screens/dashboard/widgets/balance_page.dart b/lib/src/screens/dashboard/widgets/balance_page.dart index 7409a78ef..01fb42495 100644 --- a/lib/src/screens/dashboard/widgets/balance_page.dart +++ b/lib/src/screens/dashboard/widgets/balance_page.dart @@ -59,14 +59,15 @@ class BalancePage extends StatelessWidget { return AutoSizeText( dashboardViewModel.balanceViewModel.cryptoBalance, style: TextStyle( - fontSize: 40, + fontSize: 54, fontWeight: FontWeight.bold, color: Theme.of(context) .accentTextTheme .display3 .backgroundColor, height: 1), - ); + maxLines: 1, + textAlign: TextAlign.center); }), SizedBox(height: 10), Observer(builder: (_) { diff --git a/lib/src/screens/dashboard/widgets/trade_row.dart b/lib/src/screens/dashboard/widgets/trade_row.dart index 4a4979699..449c4d016 100644 --- a/lib/src/screens/dashboard/widgets/trade_row.dart +++ b/lib/src/screens/dashboard/widgets/trade_row.dart @@ -25,56 +25,53 @@ class TradeRow extends StatelessWidget { return InkWell( onTap: onTap, child: Container( - height: 52, + padding: EdgeInsets.fromLTRB(24, 8, 24, 8), color: Colors.transparent, - padding: EdgeInsets.only(left: 24, right: 24), child: Row( - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - _getPoweredImage(provider), - Expanded( - child: Padding( - padding: const EdgeInsets.only(left: 12), - child: Container( - height: 46, - child: Column( + mainAxisSize: MainAxisSize.max, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + _getPoweredImage(provider), + SizedBox(width: 12), + Expanded( + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ + Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, - mainAxisSize: MainAxisSize.max, children: [ - Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Text('${from.toString()} → ${to.toString()}', - style: TextStyle( - fontSize: 16, - fontWeight: FontWeight.w500, - color: Theme.of(context).accentTextTheme. - display3.backgroundColor - )), - formattedAmount != null - ? Text(formattedAmount + ' ' + amountCrypto, - style: TextStyle( - fontSize: 16, - fontWeight: FontWeight.w500, - color: Theme.of(context).accentTextTheme. - display3.backgroundColor - )) - : Container() - ]), - Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Text(createdAtFormattedDate, - style: TextStyle( - fontSize: 14, - color: Theme.of(context).textTheme - .overline.backgroundColor)) - ]), - ], - ), - ), - )) - ]), + Text('${from.toString()} → ${to.toString()}', + style: TextStyle( + fontSize: 16, + fontWeight: FontWeight.w500, + color: Theme.of(context).accentTextTheme. + display3.backgroundColor + )), + formattedAmount != null + ? Text(formattedAmount + ' ' + amountCrypto, + style: TextStyle( + fontSize: 16, + fontWeight: FontWeight.w500, + color: Theme.of(context).accentTextTheme. + display3.backgroundColor + )) + : Container() + ]), + SizedBox(height: 5), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Text(createdAtFormattedDate, + style: TextStyle( + fontSize: 14, + color: Theme.of(context).textTheme + .overline.backgroundColor)) + ]) + ], + ) + ) + ], + ), )); } diff --git a/lib/src/screens/dashboard/widgets/transaction_raw.dart b/lib/src/screens/dashboard/widgets/transaction_raw.dart index 799a02ec6..23a3eccec 100644 --- a/lib/src/screens/dashboard/widgets/transaction_raw.dart +++ b/lib/src/screens/dashboard/widgets/transaction_raw.dart @@ -23,75 +23,73 @@ class TransactionRow extends StatelessWidget { return InkWell( onTap: onTap, child: Container( - height: 62, + padding: EdgeInsets.fromLTRB(24, 8, 24, 8), color: Colors.transparent, - padding: EdgeInsets.only(left: 24, right: 24), child: Row( - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Container( - height: 36, - width: 36, - decoration: BoxDecoration( - shape: BoxShape.circle, - color: Theme.of(context).textTheme.overline.decorationColor - ), - child: Image.asset( - direction == TransactionDirection.incoming - ? 'assets/images/down_arrow.png' - : 'assets/images/up_arrow.png'), + mainAxisSize: MainAxisSize.max, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Container( + height: 36, + width: 36, + decoration: BoxDecoration( + shape: BoxShape.circle, + color: Theme.of(context).textTheme.overline.decorationColor ), - Expanded( - child: Container( - padding: const EdgeInsets.only(left: 12), - height: 56, - child: Column( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - mainAxisSize: MainAxisSize.max, - children: [ - Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Text( - (direction == TransactionDirection.incoming - ? S.of(context).received - : S.of(context).sent) + - (isPending ? S.of(context).pending : ''), - style: TextStyle( - fontSize: 16, - fontWeight: FontWeight.w500, - color: Theme.of(context).accentTextTheme. - display3.backgroundColor)), - Text(formattedAmount, - style: TextStyle( - fontSize: 16, - fontWeight: FontWeight.w500, - color: Theme.of(context).accentTextTheme. - display3.backgroundColor)) - ]), - Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Text(formattedDate, - style: TextStyle( - fontSize: 14, - color: Theme.of(context) - .textTheme - .overline - .backgroundColor)), - Text(formattedFiatAmount, - style: TextStyle( - fontSize: 14, - color: Theme.of(context) - .textTheme - .overline - .backgroundColor)) - ]), - ], - ), - ), - ) - ]), + child: Image.asset( + direction == TransactionDirection.incoming + ? 'assets/images/down_arrow.png' + : 'assets/images/up_arrow.png'), + ), + SizedBox(width: 12), + Expanded( + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Text( + (direction == TransactionDirection.incoming + ? S.of(context).received + : S.of(context).sent) + + (isPending ? S.of(context).pending : ''), + style: TextStyle( + fontSize: 16, + fontWeight: FontWeight.w500, + color: Theme.of(context).accentTextTheme. + display3.backgroundColor)), + Text(formattedAmount, + style: TextStyle( + fontSize: 16, + fontWeight: FontWeight.w500, + color: Theme.of(context).accentTextTheme. + display3.backgroundColor)) + ]), + SizedBox(height: 5), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Text(formattedDate, + style: TextStyle( + fontSize: 14, + color: Theme.of(context) + .textTheme + .overline + .backgroundColor)), + Text(formattedFiatAmount, + style: TextStyle( + fontSize: 14, + color: Theme.of(context) + .textTheme + .overline + .backgroundColor)) + ]) + ], + ) + ) + ], + ), )); } } diff --git a/lib/src/screens/seed/pre_seed_page.dart b/lib/src/screens/seed/pre_seed_page.dart index 0a2bc0161..babbf33ec 100644 --- a/lib/src/screens/seed/pre_seed_page.dart +++ b/lib/src/screens/seed/pre_seed_page.dart @@ -1,3 +1,4 @@ +import 'package:cake_wallet/entities/wallet_type.dart'; import 'package:cake_wallet/routes.dart'; import 'package:cake_wallet/themes/theme_base.dart'; import 'package:flutter/cupertino.dart'; @@ -7,8 +8,17 @@ import 'package:cake_wallet/src/widgets/primary_button.dart'; import 'package:cake_wallet/src/screens/base_page.dart'; class PreSeedPage extends BasePage { - final imageLight = Image.asset('assets/images/pre_seed_light.png'); - final imageDark = Image.asset('assets/images/pre_seed_dark.png'); + PreSeedPage(this.type) + : imageLight = Image.asset('assets/images/pre_seed_light.png'), + imageDark = Image.asset('assets/images/pre_seed_dark.png'), + wordsCount = type == WalletType.monero + ? 25 + : 12; // FIXME: Stupid fast implementation + + final Image imageDark; + final Image imageLight; + final WalletType type; + final int wordsCount; @override Widget leading(BuildContext context) => null; @@ -39,7 +49,7 @@ class PreSeedPage extends BasePage { Padding( padding: EdgeInsets.only(top: 70, left: 16, right: 16), child: Text( - S.of(context).pre_seed_description, + S.of(context).pre_seed_description(wordsCount), textAlign: TextAlign.center, style: TextStyle( fontSize: 14, diff --git a/lib/store/settings_store.dart b/lib/store/settings_store.dart index db9efd8d8..30cf4f238 100644 --- a/lib/store/settings_store.dart +++ b/lib/store/settings_store.dart @@ -66,8 +66,8 @@ abstract class SettingsStoreBase with Store { reaction( (_) => currentTheme, - (ThemeBase theme) => sharedPreferences.setInt( - PreferencesKey.currentTheme, theme.raw)); + (ThemeBase theme) => + sharedPreferences.setInt(PreferencesKey.currentTheme, theme.raw)); reaction( (_) => allowBiometricalAuthentication, @@ -152,8 +152,14 @@ abstract class SettingsStoreBase with Store { final allowBiometricalAuthentication = sharedPreferences .getBool(PreferencesKey.allowBiometricalAuthenticationKey) ?? false; + final legacyTheme = + sharedPreferences.getBool(PreferencesKey.isDarkThemeLegacy) + ? ThemeType.dark.index + : ThemeType.bright.index; final savedTheme = ThemeList.deserialize( - raw: sharedPreferences.getInt(PreferencesKey.currentTheme) ?? 0); + raw: sharedPreferences.getInt(PreferencesKey.currentTheme) ?? + legacyTheme ?? + 0); final actionListDisplayMode = ObservableList(); actionListDisplayMode.addAll(deserializeActionlistDisplayModes( sharedPreferences.getInt(PreferencesKey.displayActionListModeKey) ?? diff --git a/res/values/strings_de.arb b/res/values/strings_de.arb index 9d519a6da..ee47ace4c 100644 --- a/res/values/strings_de.arb +++ b/res/values/strings_de.arb @@ -342,7 +342,7 @@ "sync_status_syncronized" : "SYNCHRONISIERT", "sync_status_not_connected" : "NICHT VERBUNDEN", "sync_status_starting_sync" : "STARTEN DER SYNCHRONISIERUNG", - "sync_status_failed_connect" : "Verbindung zum Knoten fehlgeschlagen", + "sync_status_failed_connect" : "GETRENNT", "sync_status_connecting" : "ANSCHLUSS", "sync_status_connected" : "IN VERBINDUNG GEBRACHT", diff --git a/res/values/strings_en.arb b/res/values/strings_en.arb index d249fb024..ee6925cc0 100644 --- a/res/values/strings_en.arb +++ b/res/values/strings_en.arb @@ -342,7 +342,7 @@ "sync_status_syncronized" : "SYNCHRONIZED", "sync_status_not_connected" : "NOT CONNECTED", "sync_status_starting_sync" : "STARTING SYNC", - "sync_status_failed_connect" : "FAILED CONNECT TO THE NODE", + "sync_status_failed_connect" : "DISCONNECTED", "sync_status_connecting" : "CONNECTING", "sync_status_connected" : "CONNECTED", diff --git a/res/values/strings_es.arb b/res/values/strings_es.arb index f5ca1310e..7483b75e0 100644 --- a/res/values/strings_es.arb +++ b/res/values/strings_es.arb @@ -342,7 +342,7 @@ "sync_status_syncronized" : "SINCRONIZADO", "sync_status_not_connected" : "NO CONECTADO", "sync_status_starting_sync" : "EMPEZANDO A SINCRONIZAR", - "sync_status_failed_connect" : "CONEXIÓN FALLIDA AL NODO", + "sync_status_failed_connect" : "DESCONECTADO", "sync_status_connecting" : "CONECTANDO", "sync_status_connected" : "CONECTADO", diff --git a/res/values/strings_hi.arb b/res/values/strings_hi.arb index 315c21b79..21caa7c77 100644 --- a/res/values/strings_hi.arb +++ b/res/values/strings_hi.arb @@ -342,7 +342,7 @@ "sync_status_syncronized" : "सिंक्रनाइज़", "sync_status_not_connected" : "जुड़े नहीं हैं", "sync_status_starting_sync" : "सिताज़ा करना", - "sync_status_failed_connect" : "फेल हुआ कनेक्ट नोड", + "sync_status_failed_connect" : "डिस्कनेक्ट किया गया", "sync_status_connecting" : "कनेक्ट", "sync_status_connected" : "जुड़े हुए", diff --git a/res/values/strings_ja.arb b/res/values/strings_ja.arb index 8b091406f..eff9adf68 100644 --- a/res/values/strings_ja.arb +++ b/res/values/strings_ja.arb @@ -342,7 +342,7 @@ "sync_status_syncronized" : "同期された", "sync_status_not_connected" : "接続されていません", "sync_status_starting_sync" : "同期の開始", - "sync_status_failed_connect" : "ノードへの接続に失敗しました", + "sync_status_failed_connect" : "切断されました", "sync_status_connecting" : "接続中", "sync_status_connected" : "接続済み", diff --git a/res/values/strings_ko.arb b/res/values/strings_ko.arb index 0362c6e5a..ed0e78da6 100644 --- a/res/values/strings_ko.arb +++ b/res/values/strings_ko.arb @@ -342,7 +342,7 @@ "sync_status_syncronized" : "동기화", "sync_status_not_connected" : "연결되지 않은", "sync_status_starting_sync" : "동기화 시작", - "sync_status_failed_connect" : "노드에 연결하지 못했습니다", + "sync_status_failed_connect" : "연결 해제", "sync_status_connecting" : "연결 중", "sync_status_connected" : "연결됨", diff --git a/res/values/strings_nl.arb b/res/values/strings_nl.arb index 265d4c452..b8d6a9ab4 100644 --- a/res/values/strings_nl.arb +++ b/res/values/strings_nl.arb @@ -342,7 +342,7 @@ "sync_status_syncronized" : "SYNCHRONIZED", "sync_status_not_connected" : "NIET VERBONDEN", "sync_status_starting_sync" : "BEGINNEN MET SYNCHRONISEREN", - "sync_status_failed_connect" : "MISLUKT VERBINDING MET DE NODE", + "sync_status_failed_connect" : "LOSGEKOPPELD", "sync_status_connecting" : "AANSLUITING", "sync_status_connected" : "VERBONDEN", diff --git a/res/values/strings_pl.arb b/res/values/strings_pl.arb index dd38e9e02..1fe58d723 100644 --- a/res/values/strings_pl.arb +++ b/res/values/strings_pl.arb @@ -342,7 +342,7 @@ "sync_status_syncronized" : "SYNCHRONIZOWANY", "sync_status_not_connected" : "NIE POŁĄCZONY", "sync_status_starting_sync" : "ROZPOCZĘCIE SYNCHRONIZACJI", - "sync_status_failed_connect" : "NIE MOŻNA PODŁĄCZYĆ DO WĘZŁA", + "sync_status_failed_connect" : "NIEPOWIĄZANY", "sync_status_connecting" : "ZŁĄCZONY", "sync_status_connected" : "POŁĄCZONY", diff --git a/res/values/strings_pt.arb b/res/values/strings_pt.arb index 73b53cd16..9049b824e 100644 --- a/res/values/strings_pt.arb +++ b/res/values/strings_pt.arb @@ -342,7 +342,7 @@ "sync_status_syncronized" : "SINCRONIZADO", "sync_status_not_connected" : "DESCONECTADO", "sync_status_starting_sync" : "INICIANDO SINCRONIZAÇÃO", - "sync_status_failed_connect" : "Erro ao conectar com o nó", + "sync_status_failed_connect" : "DESCONECTADO", "sync_status_connecting" : "CONECTANDO", "sync_status_connected" : "CONECTADO", diff --git a/res/values/strings_ru.arb b/res/values/strings_ru.arb index d578c851c..f3e633512 100644 --- a/res/values/strings_ru.arb +++ b/res/values/strings_ru.arb @@ -342,7 +342,7 @@ "sync_status_syncronized" : "СИНХРОНИЗИРОВАН", "sync_status_not_connected" : "НЕ ПОДКЛЮЧЁН", "sync_status_starting_sync" : "НАЧАЛО СИНХРОНИЗАЦИИ", - "sync_status_failed_connect" : "ОШИБКА ПОДКЛЮЧЕНИЯ К НОДЕ", + "sync_status_failed_connect" : "ОТКЛЮЧЕНО", "sync_status_connecting" : "ПОДКЛЮЧЕНИЕ", "sync_status_connected" : "ПОДКЛЮЧЕНО", diff --git a/res/values/strings_uk.arb b/res/values/strings_uk.arb index 81f69352d..d0906da4b 100644 --- a/res/values/strings_uk.arb +++ b/res/values/strings_uk.arb @@ -342,7 +342,7 @@ "sync_status_syncronized" : "СИНХРОНІЗОВАНИЙ", "sync_status_not_connected" : "НЕ ПІДКЛЮЧЕННИЙ", "sync_status_starting_sync" : "ПОЧАТОК СИНХРОНІЗАЦІЇ", - "sync_status_failed_connect" : "ПОМИЛКА ПІДКЛЮЧЕННЯ ДО ВУЗЛУ", + "sync_status_failed_connect" : "ВІДКЛЮЧЕНО", "sync_status_connecting" : "ПІДКЛЮЧЕННЯ", "sync_status_connected" : "ПІДКЛЮЧЕНО", diff --git a/res/values/strings_zh.arb b/res/values/strings_zh.arb index 4a6d2a6b2..890a3b502 100644 --- a/res/values/strings_zh.arb +++ b/res/values/strings_zh.arb @@ -342,7 +342,7 @@ "sync_status_syncronized" : "已同步", "sync_status_not_connected" : "未连接", "sync_status_starting_sync" : "开始同步", - "sync_status_failed_connect" : "无法连接到节点", + "sync_status_failed_connect" : "斷線", "sync_status_connecting" : "连接中", "sync_status_connected" : "连接的",