diff --git a/assets/chests/1.png b/assets/chests/1.png index 327ce154552d3853601beeefaaa3092f077c2a80..419b1ac2b45e597f610bf9cd701e0ad66a1c3ebd 100644 Binary files a/assets/chests/1.png and b/assets/chests/1.png differ diff --git a/assets/chests/2.png b/assets/chests/2.png index bfb1a08b87c0ba50fef7bf00f1f177035a74875c..4ed6b34a1da92f08aaeca060380e46360d99d6f6 100644 Binary files a/assets/chests/2.png and b/assets/chests/2.png differ diff --git a/assets/chests/3.png b/assets/chests/3.png index fb93100c5609aff37e2f6efacd518d8752d582a7..66add243bf6a77eecb62c3945b075f4b8cdd6647 100644 Binary files a/assets/chests/3.png and b/assets/chests/3.png differ diff --git a/assets/chests/4.png b/assets/chests/4.png index a759503d57cc20db41bd48bafdaa496208db359c..7bc245f8e3c63372262c9fcb2f52fc087943068f 100644 Binary files a/assets/chests/4.png and b/assets/chests/4.png differ diff --git a/assets/chests/5.png b/assets/chests/5.png index 84d14905f6c474914b34991af36e52f9055d17f3..8852a6916a3b93b5ce68b98c618514924fbe9d5b 100644 Binary files a/assets/chests/5.png and b/assets/chests/5.png differ diff --git a/assets/chests/6.png b/assets/chests/6.png index 8f1556b586de45b602da90a7c0eff06917ed5288..1de8739db7b9c63d8cdec4d49237faa67a345f2c 100644 Binary files a/assets/chests/6.png and b/assets/chests/6.png differ diff --git a/assets/chests/7.png b/assets/chests/7.png index c34e084e185bf02f9607332d6c31d043f012e4ec..06bae0eea0f1ee98946b3d0bc804b7adfeb1c7f0 100644 Binary files a/assets/chests/7.png and b/assets/chests/7.png differ diff --git a/assets/home/loupe2.png b/assets/home/loupe2.png new file mode 100644 index 0000000000000000000000000000000000000000..5215d80385939d0dd9abeadf2a54f233b1856903 Binary files /dev/null and b/assets/home/loupe2.png differ diff --git a/assets/home/wallet.svg b/assets/home/wallet.svg new file mode 100644 index 0000000000000000000000000000000000000000..7fa92172e0f8f5991e0571e4fa90e4030d64b29d --- /dev/null +++ b/assets/home/wallet.svg @@ -0,0 +1,92 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + version="1.1" + x="0px" + y="0px" + viewBox="0 0 100 125" + id="svg10" + sodipodi:docname="wallet.svg" + inkscape:version="0.92.5 (2060ec1f9f, 2020-04-08)"> + <metadata + id="metadata16"> + <rdf:RDF> + <cc:Work + rdf:about=""> + <dc:format>image/svg+xml</dc:format> + <dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> + <dc:title></dc:title> + </cc:Work> + </rdf:RDF> + </metadata> + <defs + id="defs14"> + <clipPath + clipPathUnits="userSpaceOnUse" + id="clipPath138"> + <rect + style="fill:#000000;fill-opacity:1" + id="rect140" + width="91.747101" + height="91.747101" + x="4.4194174" + y="957.15405" /> + </clipPath> + </defs> + <sodipodi:namedview + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1" + objecttolerance="10" + gridtolerance="10" + guidetolerance="10" + inkscape:pageopacity="0" + inkscape:pageshadow="2" + inkscape:window-width="1920" + inkscape:window-height="1015" + id="namedview12" + showgrid="true" + inkscape:zoom="5.6568543" + inkscape:cx="35.337997" + inkscape:cy="80.718182" + inkscape:window-x="1920" + inkscape:window-y="0" + inkscape:window-maximized="1" + inkscape:current-layer="svg10" /> + <g + transform="translate(0,-952.36218)" + id="g4" + clip-path="url(#clipPath138)" + inkscape:export-xdpi="96" + inkscape:export-ydpi="96" + style="fill:#ffffff"> + <path + style="font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-indent:0;text-align:start;text-decoration:none;line-height:normal;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;text-anchor:start;baseline-shift:baseline;opacity:1;color:#000000;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:4;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate;font-family:Sans;-inkscape-font-specification:Sans" + d="M 50.90625 6 A 2.0002 2.0002 0 0 0 49.84375 6.5 L 30.0625 24.46875 L 18.1875 24.46875 C 15.543683 24.44965 13.123155 25.17569 11.25 26.46875 C 9.3768448 27.76181 7.9999596 29.75493 8 32.09375 L 8.03125 86.625 C 8.03684 88.8921 9.3819629 90.8203 11.1875 92.0625 C 12.993037 93.3047 15.308353 94 17.84375 94 L 77.6875 94 C 80.644255 94 83.374448 92.089642 84.4375 89.25 C 86.113053 89.114967 87.744729 88.6459 89.125 87.6875 C 90.81563 86.5136 92 84.44345 92 82.03125 L 92 32.09375 C 92 30.15621 91.430591 28.26221 90.1875 26.8125 C 88.944409 25.36279 86.997793 24.47521 84.8125 24.46875 L 74.96875 24.4375 L 69.5 13.25 A 2.0002 2.0002 0 0 0 67.53125 12.125 A 2.0002 2.0002 0 0 0 66.78125 12.34375 L 60.46875 15.59375 L 52.71875 6.6875 A 2.0002 2.0002 0 0 0 50.90625 6 z M 51.03125 10.84375 L 56.8125 17.5 L 26.5 33.125 L 51.03125 10.84375 z M 66.8125 16.84375 L 75.1875 33.96875 L 33.5625 34 L 66.8125 16.84375 z M 76.9375 28.4375 L 84.8125 28.46875 C 86.009294 28.47275 86.654841 28.85275 87.15625 29.4375 C 87.657659 30.0223 88 30.92895 88 32.09375 L 88 50.1875 L 67.625 50.1875 C 65.302589 50.1875 63.593739 52.225 63.59375 54.4375 L 63.59375 64.5 C 63.593768 66.7125 65.302709 68.78125 67.625 68.78125 L 88 68.78125 L 88 82.03125 C 88 83.31875 87.603802 83.87855 86.84375 84.40625 C 86.37816 84.729568 85.69117 84.975519 84.90625 85.125 L 84.90625 73.5625 A 2.0002 2.0002 0 1 0 80.90625 73.5625 L 80.90625 86.625 C 80.90625 88.7156 79.289498 90 77.6875 90 L 17.84375 90 C 16.046389 90 14.457371 89.48295 13.4375 88.78125 C 12.417629 88.07965 12.033004 87.30545 12.03125 86.59375 L 12 36.84375 C 13.469144 37.606227 15.201391 38.000302 17.0625 38 L 78.5 37.96875 C 79.316994 37.96862 79.724605 38.2578 80.15625 38.84375 C 80.587895 39.4297 80.906252 40.37836 80.90625 41.34375 L 80.90625 44.53125 A 2.0002 2.0002 0 1 0 84.90625 44.53125 L 84.90625 41.34375 C 84.906254 39.6214 84.425391 37.89465 83.375 36.46875 C 82.541915 35.337841 81.241284 34.452882 79.71875 34.125 L 76.9375 28.4375 z M 18.15625 28.46875 A 2.0002 2.0002 0 0 0 18.1875 28.46875 L 25.6875 28.46875 L 19.59375 34 L 17.0625 34 C 15.604391 34.00024 14.294499 33.60485 13.4375 33.0625 C 12.580501 32.52015 12.218298 31.89481 12.15625 31.40625 A 2.0002 2.0002 0 0 0 12.15625 31.375 C 12.362153 30.832741 12.788717 30.262578 13.53125 29.75 C 14.615705 29.00139 16.267859 28.45508 18.15625 28.46875 z M 67.625 54.1875 L 88 54.1875 L 88 64.78125 L 67.65625 64.78125 C 67.655285 64.784472 67.64577 64.78125 67.625 64.78125 C 67.611788 64.759611 67.59375 64.685125 67.59375 64.5 L 67.59375 54.4375 C 67.593749 54.1412 67.708223 54.1875 67.625 54.1875 z M 71.5 55.6875 A 2.0002 2.0002 0 0 0 69.71875 57.71875 L 69.71875 61.25 A 2.0002 2.0002 0 1 0 73.71875 61.25 L 73.71875 57.71875 A 2.0002 2.0002 0 0 0 71.5 55.6875 z " + transform="translate(0,952.36218)" + id="path2" /> + </g> + <text + x="0" + y="115" + fill="#000000" + font-size="5px" + font-weight="bold" + font-family="'Helvetica Neue', Helvetica, Arial-Unicode, Arial, Sans-serif" + id="text6">Created by counloucon</text> + <text + x="0" + y="120" + fill="#000000" + font-size="5px" + font-weight="bold" + font-family="'Helvetica Neue', Helvetica, Arial-Unicode, Arial, Sans-serif" + id="text8">from the Noun Project</text> +</svg> diff --git a/lib/main.dart b/lib/main.dart index d53b3674a629839505b8b99a371b16e6592e9aea..9ad437f66ee0f8c6f215d9cb12be5560b0640ba3 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -41,12 +41,10 @@ import 'package:flutter/foundation.dart'; import 'package:responsive_framework/responsive_framework.dart'; import 'package:shared_preferences/shared_preferences.dart'; import 'package:sentry_flutter/sentry_flutter.dart'; -import 'package:flutter_driver/driver_extension.dart'; const bool enableSentry = true; Future<void> main() async { - enableFlutterDriverExtension(); WidgetsFlutterBinding.ensureInitialized(); HomeProvider _homeProvider = HomeProvider(); diff --git a/lib/screens/home.dart b/lib/screens/home.dart index ac99a871286ed68bf82fcd44ccf977d471b9583d..e5f3e90669f8e166d09493b91637ac4ea67723a2 100644 --- a/lib/screens/home.dart +++ b/lib/screens/home.dart @@ -27,7 +27,7 @@ class HomeScreen extends StatelessWidget { final bool isWalletsExists = _myWalletProvider.checkIfWalletExist(); - var statusBarHeight = MediaQuery.of(context).padding.top; + final double statusBarHeight = MediaQuery.of(context).padding.top; isTall = false; ratio = 1; @@ -97,259 +97,254 @@ class HomeScreen extends StatelessWidget { fit: BoxFit.cover, ), ), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: <Widget>[ - Stack(children: <Widget>[ - Positioned( - top: statusBarHeight + 10, - left: 15, - child: Builder( - builder: (context) => IconButton( - key: const Key('drawerMenu'), - icon: const Icon( - Icons.menu, - color: Colors.white, - size: 35, - ), - onPressed: () => Scaffold.of(context).openDrawer(), - ), + child: + Column(crossAxisAlignment: CrossAxisAlignment.start, children: < + Widget>[ + Stack(children: <Widget>[ + Positioned( + top: statusBarHeight + 10, + left: 15, + child: Builder( + builder: (context) => IconButton( + key: const Key('drawerMenu'), + icon: const Icon( + Icons.menu, + color: Colors.white, + size: 35, ), + onPressed: () => Scaffold.of(context).openDrawer(), ), - const Align( - child: Image( - image: AssetImage('assets/home/header.png'), - height: 210), + ), + ), + const Align( + child: Image( + image: AssetImage('assets/home/header.png'), height: 210), + ), + ]), + Padding( + padding: EdgeInsets.only(top: 15 * ratio), + child: Row( + mainAxisAlignment: MainAxisAlignment.center, + children: const <Widget>[ + Text( + "y'a pas de lézard ;-)", + textAlign: TextAlign.center, + style: TextStyle( + color: Colors.white, + fontSize: 24, + fontWeight: FontWeight.w700, + shadows: <Shadow>[ + Shadow( + offset: Offset(0, 0), + blurRadius: 20, + color: Colors.black, + ), + Shadow( + offset: Offset(0, 0), + blurRadius: 20, + color: Colors.black, + ), + ], + ), + ) + ]), + ), + Expanded( + flex: 1, + child: Container( + decoration: BoxDecoration( + gradient: LinearGradient( + begin: Alignment.topCenter, + end: Alignment.bottomCenter, + colors: [ + Colors.transparent, + Colors.black.withOpacity(0.9), + ], ), - ]), - Padding( - padding: const EdgeInsets.only(top: 15), - child: Row( + ), + child: Column(children: <Widget>[ + const Spacer(), + Row( mainAxisAlignment: MainAxisAlignment.center, - children: const <Widget>[ - Text( - "y'a pas de lézard ;-)", - textAlign: TextAlign.center, - style: TextStyle( - color: Colors.white, - fontSize: 24, - fontWeight: FontWeight.w700, - shadows: <Shadow>[ - Shadow( - offset: Offset(0, 0), - blurRadius: 20, - color: Colors.black, + children: <Widget>[ + Column(children: <Widget>[ + Container( + child: ClipOval( + child: Material( + color: orangeC, // button color + child: InkWell( + child: const Padding( + padding: EdgeInsets.all(18), + child: Image( + image: AssetImage( + 'assets/home/loupe.png'), + height: 70)), + onTap: () { + // Navigator.push( + // context, + // MaterialPageRoute( + // builder: (context) { + // return TemplateScreen(); + // }), + // ); + }), ), - Shadow( - offset: Offset(0, 0), - blurRadius: 20, - color: Colors.black, + ), + decoration: const BoxDecoration( + shape: BoxShape.circle, + color: Colors.black, + boxShadow: [ + BoxShadow( + blurRadius: 2, + offset: Offset(1, 1.5), + spreadRadius: 0.5) + ], + ), + ), + const SizedBox(height: 12), + const Text( + "Rechercher un\nportfeuille", + textAlign: TextAlign.center, + style: TextStyle( + color: Colors.white, + fontSize: 17, + fontWeight: FontWeight.w500), + ) + ]), + const SizedBox(width: 120), + Column(children: <Widget>[ + Container( + child: ClipOval( + key: const Key('manageWallets'), + child: Material( + color: orangeC, // button color + child: InkWell( + child: const Padding( + padding: EdgeInsets.all(18), + child: Image( + image: AssetImage( + 'assets/home/wallet.png'), + height: 75)), + onTap: () { + WalletData defaultWallet = + _myWalletProvider.getDefaultWallet( + configBox.get('currentChest')); + isWalletsExists + ? Navigator.push(context, + MaterialPageRoute( + builder: (context) { + return UnlockingWallet( + wallet: defaultWallet, + action: "mywallets", + ); + })) + + // Navigator.pushNamed( + // context, '/mywallets') + : Navigator.push(context, + MaterialPageRoute( + builder: (context) { + return const NoKeyChainScreen(); + })); + }), ), - ], + ), + decoration: const BoxDecoration( + shape: BoxShape.circle, + color: Colors.black, + boxShadow: [ + BoxShadow( + blurRadius: 2, + offset: Offset(1, 1.5), + spreadRadius: 0.5) + ], + ), ), - ) + const SizedBox(height: 12), + const Text( + "Gérer mes\nportefeuilles", + textAlign: TextAlign.center, + style: TextStyle( + color: Colors.white, + fontSize: 17, + fontWeight: FontWeight.w500), + ) + ]) ]), - ), - Expanded( - flex: 1, - child: Container( - decoration: BoxDecoration( - gradient: LinearGradient( - begin: Alignment.topCenter, - end: Alignment.bottomCenter, - colors: [ - Colors.transparent, - Colors.black.withOpacity(0.9), - ], - ), - ), - child: Column(children: <Widget>[ - Padding( - padding: EdgeInsets.only(top: isTall ? 240 : 130), - child: Row( - mainAxisAlignment: MainAxisAlignment.center, - children: <Widget>[ - Column(children: <Widget>[ - Container( - child: ClipOval( - child: Material( - color: orangeC, // button color - child: InkWell( - child: const Padding( - padding: EdgeInsets.all(18), - child: Image( - image: AssetImage( - 'assets/home/loupe.png'), - height: 70)), - onTap: () { - // Navigator.push( - // context, - // MaterialPageRoute( - // builder: (context) { - // return TemplateScreen(); - // }), - // ); - }), - ), - ), - decoration: const BoxDecoration( - shape: BoxShape.circle, - color: Colors.black, - boxShadow: [ - BoxShadow( - blurRadius: 2, - offset: Offset(1, 1.5), - spreadRadius: 0.5) - ], - ), - ), - const SizedBox(height: 12), - const Text( - "Rechercher un\nportfeuille", - textAlign: TextAlign.center, - style: TextStyle( - color: Colors.white, - fontSize: 17, - fontWeight: FontWeight.w500), - ) - ]), - const SizedBox(width: 120), - Column(children: <Widget>[ - Container( - child: ClipOval( - key: const Key('manageWallets'), - child: Material( - color: orangeC, // button color - child: InkWell( - child: const Padding( - padding: EdgeInsets.all(18), - child: Image( - image: AssetImage( - 'assets/home/wallet.png'), - height: 75)), - onTap: () { - WalletData defaultWallet = - _myWalletProvider - .getDefaultWallet( - configBox.get( - 'currentChest')); - isWalletsExists - ? Navigator.push(context, - MaterialPageRoute( - builder: (context) { - return UnlockingWallet( - wallet: defaultWallet, - action: "mywallets", - ); - })) - - // Navigator.pushNamed( - // context, '/mywallets') - : Navigator.push(context, - MaterialPageRoute( - builder: (context) { - return const NoKeyChainScreen(); - })); - }), - ), - ), - decoration: const BoxDecoration( - shape: BoxShape.circle, - color: Colors.black, - boxShadow: [ - BoxShadow( - blurRadius: 2, - offset: Offset(1, 1.5), - spreadRadius: 0.5) - ], - ), - ), - const SizedBox(height: 12), - const Text( - "Gérer mes\nportefeuilles", - textAlign: TextAlign.center, - style: TextStyle( - color: Colors.white, - fontSize: 17, - fontWeight: FontWeight.w500), - ) - ]) - ]), - ), - Padding( - padding: const EdgeInsets.only(top: 40), - child: Row( - mainAxisAlignment: MainAxisAlignment.center, - children: <Widget>[ - Column(children: <Widget>[ - Container( - child: ClipOval( - child: Material( - color: orangeC, // button color - child: InkWell( - child: const Padding( - padding: EdgeInsets.all(22), - child: Image( - image: AssetImage( - 'assets/home/qrcode.png'), - height: 60)), - onTap: () async { - await _historyProvider - .scan(context); - }), - ), - ), - decoration: const BoxDecoration( - shape: BoxShape.circle, - color: Colors.black, - boxShadow: [ - BoxShadow( - blurRadius: 2, - offset: Offset(1, 1.5), - spreadRadius: 0.5) - ], - ), + Padding( + padding: const EdgeInsets.only(top: 40), + child: Row( + mainAxisAlignment: MainAxisAlignment.center, + children: <Widget>[ + Column(children: <Widget>[ + Container( + child: ClipOval( + child: Material( + color: orangeC, // button color + child: InkWell( + child: const Padding( + padding: EdgeInsets.all(18), + child: Image( + image: AssetImage( + 'assets/home/qrcode.png'), + height: 75)), + onTap: () async { + await _historyProvider.scan(context); + }), ), - const SizedBox(height: 12), - const Text( - "Scanner un\nQR code", - textAlign: TextAlign.center, - style: TextStyle( - color: Colors.white, - fontSize: 17, - fontWeight: FontWeight.w500), - ) - ]) - ]), - ), - ]), - // bottomNavigationBar: BottomNavigationBar( - // backgroundColor: Color(0xffFFD58D), - // fixedColor: Colors.grey[850], - // unselectedItemColor: Color(0xffBD935C), - // type: BottomNavigationBarType.fixed, - // onTap: (index) { - // _homeProvider.currentIndex = index; - // }, - // currentIndex: _homeProvider.currentIndex, - // items: [ - // BottomNavigationBarItem( - // icon: Image.asset('assets/block-space-disabled.png', height: 26), - // activeIcon: Image.asset('assets/blockchain.png', height: 26), - // label: 'Explorateur', - // ), - // BottomNavigationBarItem( - // icon: Icon(Icons.lock), - // label: 'Mes portefeuilles', - // ), - // ], - // ), + ), + decoration: const BoxDecoration( + shape: BoxShape.circle, + color: Colors.black, + boxShadow: [ + BoxShadow( + blurRadius: 2, + offset: Offset(1, 1.5), + spreadRadius: 0.5) + ], + ), + ), + const SizedBox(height: 12), + const Text( + "Scanner un\nQR code", + textAlign: TextAlign.center, + style: TextStyle( + color: Colors.white, + fontSize: 17, + fontWeight: FontWeight.w500), + ) + ]) + ]), ), - ) - ]), + SizedBox(height: isTall ? 80 : 40) + ]), + ), + ) + ]), ), ), ), + // bottomNavigationBar: BottomNavigationBar( + // backgroundColor: backgroundColor, + // fixedColor: Colors.grey[850], + // unselectedItemColor: const Color(0xffBD935C), + // type: BottomNavigationBarType.fixed, + // onTap: (index) { + // _homeProvider.currentIndex = index; + // }, + // currentIndex: _homeProvider.currentIndex, + // items: [ + // BottomNavigationBarItem( + // icon: Image.asset('assets/block-space-disabled.png', height: 26), + // activeIcon: Image.asset('assets/blockchain.png', height: 26), + // label: 'Explorateur', + // ), + // const BottomNavigationBarItem( + // icon: Icon(Icons.lock), + // label: 'Mes portefeuilles', + // ), + // ], + // ), ); } } diff --git a/lib/screens/myWallets/confirm_wallet_storage.dart b/lib/screens/myWallets/confirm_wallet_storage.dart index e822f19bd4374e4f908340f16e5aa785b1f10357..6861561239e206277e01bc87a4851a90d39d58f6 100644 --- a/lib/screens/myWallets/confirm_wallet_storage.dart +++ b/lib/screens/myWallets/confirm_wallet_storage.dart @@ -7,6 +7,7 @@ import 'package:gecko/globals.dart'; import 'package:gecko/models/generate_wallets.dart'; import 'package:gecko/models/my_wallets.dart'; import 'package:gecko/models/wallet_options.dart'; +import 'package:gecko/screens/myWallets/unlocking_wallet.dart'; import 'package:provider/provider.dart'; // ignore: must_be_immutable @@ -152,8 +153,15 @@ class ConfirmStoreWallet extends StatelessWidget with ChangeNotifier { _walletOptions.reloadBuild(); _myWalletProvider.rebuildWidget(); }); - Navigator.popUntil( - context, ModalRoute.withName('/')); + Navigator.pushAndRemoveUntil(context, + MaterialPageRoute(builder: (context) { + return UnlockingWallet( + wallet: + _myWalletProvider.getDefaultWallet( + configBox.get('currentChest')), + action: "mywallets", + ); + }), ModalRoute.withName('/')); } : null, child: const Text('Confirmer', diff --git a/lib/screens/myWallets/generate_wallets.dart b/lib/screens/myWallets/generate_wallets.dart index b85fdbae0c52b56a6ab8ce82330dd9e116432bf5..0adf9d507482e8c42a3e5090e77c89934499674c 100644 --- a/lib/screens/myWallets/generate_wallets.dart +++ b/lib/screens/myWallets/generate_wallets.dart @@ -1,10 +1,8 @@ import 'package:flutter/services.dart'; import 'package:gecko/globals.dart'; import 'package:gecko/models/generate_wallets.dart'; -import 'package:gecko/models/my_wallets.dart'; import 'package:gecko/screens/myWallets/confirm_wallet_storage.dart'; import 'package:flutter/material.dart'; -import 'package:gecko/screens/myWallets/unlocking_wallet.dart'; import 'package:printing/printing.dart'; import 'package:provider/provider.dart'; import 'package:super_tooltip/super_tooltip.dart'; @@ -29,8 +27,6 @@ class GenerateFastChestScreen extends StatelessWidget { Provider.of<GenerateWalletsProvider>(context); _generateWalletProvider.generateMnemonic(); - MyWalletsProvider _myWalletClass = MyWalletsProvider(); - return Scaffold( appBar: AppBar( toolbarHeight: 60 * ratio, @@ -122,14 +118,17 @@ class GenerateFastChestScreen extends StatelessWidget { ); await Future.delayed( const Duration(milliseconds: 20)); - await Navigator.pushAndRemoveUntil(context, - MaterialPageRoute(builder: (context) { - return UnlockingWallet( - wallet: _myWalletClass.getDefaultWallet( - configBox.get('currentChest')), - action: "mywallets", - ); - }), ModalRoute.withName('/')); + // if (_generateWalletProvider.hasBeenStored) { + // _generateWalletProvider.hasBeenStored = false; + // await Navigator.pushAndRemoveUntil(context, + // MaterialPageRoute(builder: (context) { + // return UnlockingWallet( + // wallet: _myWalletClass.getDefaultWallet( + // configBox.get('currentChest')), + // action: "mywallets", + // ); + // }), ModalRoute.withName('/')); + // } } : null, child: const Text('Enregistrer ce trousseau', diff --git a/test_driver/app_test.dart b/test_driver/app_test.dart index e9f4c7618e9e1c203a478b9c753e056aeb2a5d6d..0efe479d18f4ece1df5f424eec3b32a27170cc64 100644 --- a/test_driver/app_test.dart +++ b/test_driver/app_test.dart @@ -217,8 +217,9 @@ void main() { {timeout = Timeout.none}) async { expect(await getText('step9'), "Super !\n\nJe vais maintenant créer votre code secret. \n\nVotre code secret chiffre votre trousseau de clefs, ce qui le rend inutilisable par d’autres, par exemple si vous perdez votre téléphone ou si on vous le vole."); - + await sleep(800); await tapOn('goStep10'); + await sleep(50); await tapOn('goStep11'); while (await getText('generatedPin') == '') {