Merge remote-tracking branch 'origin/4.0.9' into CAKE-169-improve-new-node-screen-form

# Conflicts:
#	lib/generated/i18n.dart
#	res/values/strings_de.arb
#	res/values/strings_en.arb
#	res/values/strings_es.arb
#	res/values/strings_hi.arb
#	res/values/strings_ja.arb
#	res/values/strings_ko.arb
#	res/values/strings_nl.arb
#	res/values/strings_pl.arb
#	res/values/strings_pt.arb
#	res/values/strings_ru.arb
#	res/values/strings_uk.arb
#	res/values/strings_zh.arb
This commit is contained in:
Oleksandr Sobol
2020-12-02 20:42:41 +02:00
26 changed files with 135 additions and 16 deletions
+1 -1
View File
@@ -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:
+3
View File
@@ -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<SettingsStore>().shouldSaveRecipientAddress,
transactionDescriptionBox));
getIt.registerFactory(() => PreSeedPage());
}
+7 -2
View File
@@ -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<dynamic> createRoute(RouteSettings settings) {
(PinCodeState<PinCodeWidget> context, dynamic _) async {
try {
context.changeProcessText(
'Creating new wallet'); // FIXME: Unnamed constant
S.current.creating_new_wallet);
final newWalletVM =
getIt.get<WalletNewVM>(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<dynamic> createRoute(RouteSettings settings) {
return MaterialPageRoute<void>(
builder: (_) => getIt.get<LanguageListPage>());
case Routes.preSeed:
return MaterialPageRoute<void>(
builder: (_) => getIt.get<PreSeedPage>());
default:
return MaterialPageRoute<void>(
builder: (_) => Scaffold(
+1
View File
@@ -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';
}
@@ -39,7 +39,7 @@ class AddressPage extends StatelessWidget {
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
Text(
S.of(context).addresses,
S.of(context).accounts_subaddresses,
style: TextStyle(
fontSize: 14,
fontWeight: FontWeight.w500,
+1 -11
View File
@@ -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: <Widget>[
Expanded(
+72
View File
@@ -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<SettingsStore>().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)
],
)
)
],
),
);
}
}
@@ -243,7 +243,7 @@ class WalletListBodyState extends State<WalletListBody> {
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()));
}