Merge branch '4.1.0' into CAKE-216-exchange-status-bug

This commit is contained in:
OleksandrSobol 2020-12-18 21:05:02 +02:00
commit 7168e4727d
110 changed files with 4385 additions and 1205 deletions

View file

@ -62,32 +62,21 @@ Route<dynamic> createRoute(RouteSettings settings) {
case Routes.newWalletFromWelcome:
return CupertinoPageRoute<void>(
builder: (_) => getIt.get<SetupPinCodePage>(param1:
(PinCodeState<PinCodeWidget> context, dynamic _) async {
try {
context.changeProcessText(
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.preSeed);
} catch (e) {
context.changeProcessText('Error: ${e.toString()}');
}
}),
builder: (_) => getIt.get<SetupPinCodePage>(
param1: (PinCodeState<PinCodeWidget> context, dynamic _) =>
Navigator.of(context.context)
.pushNamed(Routes.newWalletType)),
fullscreenDialog: true);
case Routes.newWalletType:
return CupertinoPageRoute<void>(
builder: (_) => NewWalletTypePage(
onTypeSelected: (context, type) => Navigator.of(context)
.pushNamed(Routes.newWallet, arguments: type)));
builder: (_) => getIt.get<NewWalletTypePage>(
param1: (BuildContext context, WalletType _) =>
Navigator.of(context).pushNamed(Routes.preSeed, arguments: true),
param2: true));
case Routes.newWallet:
final type = WalletType.monero; // settings.arguments as WalletType;
final type = settings.arguments as WalletType;
final walletNewVM = getIt.get<WalletNewVM>(param1: type);
return CupertinoPageRoute<void>(
@ -106,11 +95,11 @@ Route<dynamic> createRoute(RouteSettings settings) {
case Routes.restoreWalletType:
return CupertinoPageRoute<void>(
builder: (_) => NewWalletTypePage(
onTypeSelected: (context, type) => Navigator.of(context)
.pushNamed(Routes.restoreWalletOptions, arguments: type),
isNewWallet: false,
));
builder: (_) => getIt.get<NewWalletTypePage>(
param1: (BuildContext context, WalletType type) =>
Navigator.of(context)
.pushNamed(Routes.restoreWallet, arguments: type),
param2: false));
case Routes.restoreOptions:
final type = settings.arguments as WalletType;
@ -148,7 +137,7 @@ Route<dynamic> createRoute(RouteSettings settings) {
return CupertinoPageRoute<void>(
builder: (_) => getIt.get<SetupPinCodePage>(
param1: (PinCodeState<PinCodeWidget> context, dynamic _) =>
Navigator.pushNamed(context.context, Routes.restoreWallet)),
Navigator.pushNamed(context.context, Routes.restoreWalletType)),
fullscreenDialog: true);
case Routes.seed:
@ -159,15 +148,10 @@ Route<dynamic> createRoute(RouteSettings settings) {
case Routes.restoreWallet:
return MaterialPageRoute<void>(
builder: (_) =>
getIt.get<WalletRestorePage>(param1: WalletType.monero));
getIt.get<WalletRestorePage>(param1: settings.arguments as WalletType));
case Routes.restoreWalletFromSeed:
// final args = settings.arguments as List<dynamic>;
final type = WalletType.monero; //args.first as WalletType;
// final language = type == WalletType.monero
// ? args[1] as String
// : LanguageList.english;
final type = settings.arguments as WalletType;
return CupertinoPageRoute<void>(
builder: (_) => RestoreWalletFromSeedPage(type: type));