diff --git a/assets/images/france.png b/assets/images/france.png new file mode 100644 index 000000000..57b98bc32 Binary files /dev/null and b/assets/images/france.png differ diff --git a/assets/images/italy.png b/assets/images/italy.png new file mode 100644 index 000000000..616fa97d8 Binary files /dev/null and b/assets/images/italy.png differ diff --git a/cw_monero/lib/pending_monero_transaction.dart b/cw_monero/lib/pending_monero_transaction.dart index 33267c73c..d927dd0d7 100644 --- a/cw_monero/lib/pending_monero_transaction.dart +++ b/cw_monero/lib/pending_monero_transaction.dart @@ -3,6 +3,7 @@ import 'package:cw_monero/api/transaction_history.dart' as monero_transaction_history; import 'package:cw_core/crypto_currency.dart'; import 'package:cake_wallet/core/amount_converter.dart'; + import 'package:cw_core/pending_transaction.dart'; class DoubleSpendException implements Exception { diff --git a/lib/src/screens/new_wallet/new_wallet_page.dart b/lib/src/screens/new_wallet/new_wallet_page.dart index 79998e944..4d4156473 100644 --- a/lib/src/screens/new_wallet/new_wallet_page.dart +++ b/lib/src/screens/new_wallet/new_wallet_page.dart @@ -24,15 +24,17 @@ class NewWalletPage extends BasePage { final walletNameImage = Image.asset('assets/images/wallet_name.png'); final walletNameLightImage = - Image.asset('assets/images/wallet_name_light.png'); + Image.asset('assets/images/wallet_name_light.png'); @override String get title => S.current.new_wallet; @override - Widget body(BuildContext context) => WalletNameForm(_walletNewVM, + Widget body(BuildContext context) => WalletNameForm( + _walletNewVM, currentTheme.type == ThemeType.dark - ? walletNameImage : walletNameLightImage); + ? walletNameImage + : walletNameLightImage); } class WalletNameForm extends StatefulWidget { @@ -60,7 +62,8 @@ class _WalletNameFormState extends State { _stateReaction ??= reaction((_) => _walletNewVM.state, (ExecutionState state) { if (state is ExecutedSuccessfullyState) { - Navigator.of(context).pushNamed(Routes.preSeed, arguments: _walletNewVM.type); + Navigator.of(context) + .pushNamed(Routes.preSeed, arguments: _walletNewVM.type); } if (state is FailureState) { @@ -92,7 +95,8 @@ class _WalletNameFormState extends State { padding: EdgeInsets.only(left: 12, right: 12), child: AspectRatio( aspectRatio: aspectRatioImage, - child: FittedBox(child: widget.walletImage, fit: BoxFit.fill)), + child: + FittedBox(child: widget.walletImage, fit: BoxFit.fill)), ), Padding( padding: EdgeInsets.only(top: 24), diff --git a/lib/src/screens/seed_language/widgets/seed_language_picker.dart b/lib/src/screens/seed_language/widgets/seed_language_picker.dart index f3384d7a5..7a8958482 100644 --- a/lib/src/screens/seed_language/widgets/seed_language_picker.dart +++ b/lib/src/screens/seed_language/widgets/seed_language_picker.dart @@ -15,6 +15,8 @@ List flagImages = [ Image.asset('assets/images/portugal.png'), Image.asset('assets/images/russia.png'), Image.asset('assets/images/spain.png'), + Image.asset('assets/images/france.png'), + Image.asset('assets/images/italy.png'), ]; const List languageCodes = [ @@ -26,6 +28,8 @@ const List languageCodes = [ 'Por', 'Rus', 'Esp', + 'Fre', + 'Ita', ]; const defaultSeedLanguage = 'English'; @@ -38,7 +42,9 @@ const List seedLanguages = [ 'Japanese', 'Portuguese', 'Russian', - 'Spanish' + 'Spanish', + 'French', + 'Italian', ]; enum Places { topLeft, topRight, bottomLeft, bottomRight, inside } @@ -64,86 +70,80 @@ class SeedLanguagePickerState extends State { Widget build(BuildContext context) { return AlertBackground( child: Stack( - alignment: Alignment.center, + alignment: Alignment.center, + children: [ + Column( + mainAxisSize: MainAxisSize.min, children: [ - Column( - mainAxisSize: MainAxisSize.min, - children: [ - Container( - padding: EdgeInsets.only(left: 24, right: 24), - child: Text( - S.of(context).seed_choose, - textAlign: TextAlign.center, - style: TextStyle( - fontSize: 18, - fontWeight: FontWeight.bold, - fontFamily: 'Lato', - decoration: TextDecoration.none, - color: Colors.white - ), + Container( + padding: EdgeInsets.only(left: 24, right: 24), + child: Text( + S.of(context).seed_choose, + textAlign: TextAlign.center, + style: TextStyle( + fontSize: 18, + fontWeight: FontWeight.bold, + fontFamily: 'Lato', + decoration: TextDecoration.none, + color: Colors.white), + ), + ), + Padding( + padding: EdgeInsets.only(top: 24), + child: ClipRRect( + borderRadius: BorderRadius.all(Radius.circular(14)), + child: Container( + height: 300, + width: 300, + color: + Theme.of(context).accentTextTheme.title.backgroundColor, + child: GridView.count( + padding: EdgeInsets.all(0), + shrinkWrap: true, + crossAxisCount: 3, + childAspectRatio: 4 / 3, + physics: const NeverScrollableScrollPhysics(), + crossAxisSpacing: 1, + mainAxisSpacing: 1, + children: List.generate(11, (index) { + if (index == 10) { + return gridTile( + isCurrent: false, + image: null, + text: '', + onTap: null); + } + + final code = languageCodes[index]; + final flag = flagImages[index]; + final isCurrent = + index == seedLanguages.indexOf(selected); + + return gridTile( + isCurrent: isCurrent, + image: flag, + text: code, + onTap: () { + selected = seedLanguages[index]; + Navigator.of(context).pop(selected); + }); + }), ), ), - Padding( - padding: EdgeInsets.only(top: 24), - child: ClipRRect( - borderRadius: BorderRadius.all(Radius.circular(14)), - child: Container( - height: 300, - width: 300, - color: Theme.of(context).accentTextTheme.title.backgroundColor, - child: GridView.count( - padding: EdgeInsets.all(0), - shrinkWrap: true, - crossAxisCount: 3, - childAspectRatio: 1, - physics: const NeverScrollableScrollPhysics(), - crossAxisSpacing: 1, - mainAxisSpacing: 1, - children: List.generate(9, (index) { - - if (index == 8) { - - return gridTile( - isCurrent: false, - image: null, - text: '', - onTap: null); - - } - - final code = languageCodes[index]; - final flag = flagImages[index]; - final isCurrent = - index == seedLanguages.indexOf(selected); - - return gridTile( - isCurrent: isCurrent, - image: flag, - text: code, - onTap: () { - selected = seedLanguages[index]; - Navigator.of(context).pop(selected); - } - ); - }), - ), - ), - ), - ) - ], - ), - AlertCloseButton(image: closeButton) + ), + ) ], - ) - ); + ), + AlertCloseButton(image: closeButton) + ], + )); } - Widget gridTile({ - @required bool isCurrent, - @required Image image, - @required String text, - @required VoidCallback onTap}) { - + Widget gridTile( + {@required bool isCurrent, + @required Image image, + @required String text, + @required VoidCallback onTap}) { final color = isCurrent ? Theme.of(context).textTheme.body2.color : Theme.of(context).accentTextTheme.title.color; @@ -174,14 +174,12 @@ class SeedLanguagePickerState extends State { fontWeight: FontWeight.w600, fontFamily: 'Lato', decoration: TextDecoration.none, - color: textColor - ), + color: textColor), ), ) ], ), ), - ) - ); + )); } } diff --git a/lib/src/widgets/seed_language_selector.dart b/lib/src/widgets/seed_language_selector.dart index 57011f323..d77bca7cd 100644 --- a/lib/src/widgets/seed_language_selector.dart +++ b/lib/src/widgets/seed_language_selector.dart @@ -25,7 +25,9 @@ class SeedLanguageSelectorState extends State { S.current.seed_language_japanese, S.current.seed_language_portuguese, S.current.seed_language_russian, - S.current.seed_language_spanish + S.current.seed_language_spanish, + S.current.seed_language_french, + S.current.seed_language_italian, ]; String selected; final _pickerKey = GlobalKey(); diff --git a/lib/utils/language_list.dart b/lib/utils/language_list.dart index 748a36bac..bd106ab79 100644 --- a/lib/utils/language_list.dart +++ b/lib/utils/language_list.dart @@ -7,4 +7,6 @@ class LanguageList { static const portuguese = 'Portuguese'; static const russian = 'Russian'; static const spanish = 'Spanish'; -} \ No newline at end of file + // static const french = 'French'; + // static const italian = 'Italian'; +} diff --git a/res/values/strings_de.arb b/res/values/strings_de.arb index 839cf4b20..2429e0825 100644 --- a/res/values/strings_de.arb +++ b/res/values/strings_de.arb @@ -195,6 +195,8 @@ "seed_language_portuguese" : "Portugiesisch", "seed_language_russian" : "Russisch", "seed_language_spanish" : "Spanisch", + "seed_language_french": "Französisch", + "seed_language_italian": "Italiana/Italiano", "send_title" : "Senden", diff --git a/res/values/strings_en.arb b/res/values/strings_en.arb index 2626da11d..5034aba6f 100644 --- a/res/values/strings_en.arb +++ b/res/values/strings_en.arb @@ -196,6 +196,8 @@ "seed_language_portuguese" : "Portuguese", "seed_language_russian" : "Russian", "seed_language_spanish" : "Spanish", + "seed_language_french": "French", + "seed_language_italian": "Italian", "send_title" : "Send", diff --git a/res/values/strings_es.arb b/res/values/strings_es.arb index 21c7ca027..e105680ba 100644 --- a/res/values/strings_es.arb +++ b/res/values/strings_es.arb @@ -195,6 +195,8 @@ "seed_language_portuguese" : "Portugués", "seed_language_russian" : "Ruso", "seed_language_spanish" : "Español", + "seed_language_french": "Francesa/Francés", + "seed_language_italian": "Italiana/Italiano", "send_title" : "Enviar", diff --git a/res/values/strings_hi.arb b/res/values/strings_hi.arb index 42df87a18..b4f8e5cd3 100644 --- a/res/values/strings_hi.arb +++ b/res/values/strings_hi.arb @@ -195,6 +195,8 @@ "seed_language_portuguese" : "पुर्तगाली", "seed_language_russian" : "रूसी", "seed_language_spanish" : "स्पेनिश", + "seed_language_french": "फ्रेंच", + "seed_language_italian": "इतालवी", "send_title" : "संदेश", diff --git a/res/values/strings_hr.arb b/res/values/strings_hr.arb index a2071aec9..75a49c679 100644 --- a/res/values/strings_hr.arb +++ b/res/values/strings_hr.arb @@ -195,6 +195,8 @@ "seed_language_portuguese" : "Portugalski", "seed_language_russian" : "Ruski", "seed_language_spanish" : "Španjolski", + "seed_language_french": "Francuski", + "seed_language_italian": "Talijanski", "send_title" : "Pošalji", diff --git a/res/values/strings_it.arb b/res/values/strings_it.arb index d98d12d68..effd153fc 100644 --- a/res/values/strings_it.arb +++ b/res/values/strings_it.arb @@ -195,6 +195,8 @@ "seed_language_portuguese" : "Portoghese", "seed_language_russian" : "Russo", "seed_language_spanish" : "Spagnolo", + "seed_language_french": "Francese", + "seed_language_italian": "Italiana/Italiano", "send_title" : "Invia", diff --git a/res/values/strings_ja.arb b/res/values/strings_ja.arb index a332c0b07..b57b41aab 100644 --- a/res/values/strings_ja.arb +++ b/res/values/strings_ja.arb @@ -195,6 +195,8 @@ "seed_language_portuguese" : "ポルトガル語", "seed_language_russian" : "ロシア", "seed_language_spanish" : "スペイン語", + "seed_language_french": "フランス語", + "seed_language_italian": "イタリア語", "send_title" : "を送信", diff --git a/res/values/strings_ko.arb b/res/values/strings_ko.arb index e8689118e..fcdcca9aa 100644 --- a/res/values/strings_ko.arb +++ b/res/values/strings_ko.arb @@ -195,6 +195,8 @@ "seed_language_portuguese" : "포르투갈 인", "seed_language_russian" : "러시아인", "seed_language_spanish" : "스페인의", + "seed_language_french": "프랑스 국민", + "seed_language_italian": "이탈리아 사람", "send_title" : "보내다", diff --git a/res/values/strings_nl.arb b/res/values/strings_nl.arb index ecedcc333..adc5cfd30 100644 --- a/res/values/strings_nl.arb +++ b/res/values/strings_nl.arb @@ -195,6 +195,8 @@ "seed_language_portuguese" : "Portugees", "seed_language_russian" : "Russisch", "seed_language_spanish" : "Spaans", + "seed_language_french": "Frans", + "seed_language_italian": "Italiaans", "send_title" : "Stuur", diff --git a/res/values/strings_pl.arb b/res/values/strings_pl.arb index f22a47eaa..ebfb6b12d 100644 --- a/res/values/strings_pl.arb +++ b/res/values/strings_pl.arb @@ -195,6 +195,8 @@ "seed_language_portuguese" : "Portugalski", "seed_language_russian" : "Rosyjski", "seed_language_spanish" : "Hiszpański", + "seed_language_french": "Francuski", + "seed_language_italian": "Włoski", "send_title" : "Wyślij", diff --git a/res/values/strings_pt.arb b/res/values/strings_pt.arb index d8bd059ad..c1965a893 100644 --- a/res/values/strings_pt.arb +++ b/res/values/strings_pt.arb @@ -195,6 +195,8 @@ "seed_language_portuguese" : "Português", "seed_language_russian" : "Russa", "seed_language_spanish" : "Espanhola", + "seed_language_french": "Francesa/Francês", + "seed_language_italian": "Italiana/Italiano", "send_title" : "Enviar", diff --git a/res/values/strings_ru.arb b/res/values/strings_ru.arb index 3fe21e67e..89b845926 100644 --- a/res/values/strings_ru.arb +++ b/res/values/strings_ru.arb @@ -195,6 +195,8 @@ "seed_language_portuguese" : "Португальский", "seed_language_russian" : "Русский", "seed_language_spanish" : "Испанский", + "seed_language_french": "Французский", + "seed_language_italian": "итальянский", "send_title" : "Отправить", diff --git a/res/values/strings_uk.arb b/res/values/strings_uk.arb index 9a74e6a8c..092818d2f 100644 --- a/res/values/strings_uk.arb +++ b/res/values/strings_uk.arb @@ -195,7 +195,8 @@ "seed_language_portuguese" : "Португальська", "seed_language_russian" : "Російська", "seed_language_spanish" : "Іспанська", - + "seed_language_french": "французький", + "seed_language_italian": "італійська", "send_title" : "Відправити", "send_your_wallet" : "Ваш гаманець", diff --git a/res/values/strings_zh.arb b/res/values/strings_zh.arb index 262b6cacf..c4f32c64c 100644 --- a/res/values/strings_zh.arb +++ b/res/values/strings_zh.arb @@ -195,6 +195,8 @@ "seed_language_portuguese" : "葡萄牙文", "seed_language_russian" : "俄文", "seed_language_spanish" : "西班牙文", + "seed_language_french": "法语", + "seed_language_italian": "意大利语", "send_title" : "发送",