diff --git a/lib/reactions/on_authentication_state_change.dart b/lib/reactions/on_authentication_state_change.dart index 02ddd5639..d63c54781 100644 --- a/lib/reactions/on_authentication_state_change.dart +++ b/lib/reactions/on_authentication_state_change.dart @@ -146,7 +146,9 @@ void startAuthenticationStateChange( ), ); } else { - await navigatorKey.currentState!.pushNamedAndRemoveUntil(Routes.dashboard, (route) => false); + unawaited( + navigatorKey.currentState!.pushNamedAndRemoveUntil(Routes.dashboard, (route) => false), + ); } WidgetsBinding.instance.addPostFrameCallback((_) { final linkViewModel = getIt.get(); diff --git a/lib/router.dart b/lib/router.dart index a130b2667..837eab8c8 100644 --- a/lib/router.dart +++ b/lib/router.dart @@ -11,6 +11,7 @@ import 'package:cake_wallet/new-ui/pages/bridge/bridge_receiving_wallet_page.dar import 'package:cake_wallet/new-ui/pages/coin_control_page.dart'; import 'package:cake_wallet/new-ui/pages/addresses_page.dart'; import 'package:cake_wallet/new-ui/pages/lightning_username_page.dart'; +import "package:cake_wallet/new-ui/pages/receive_page.dart"; import 'package:cake_wallet/new-ui/pages/send_page.dart'; import 'package:cake_wallet/order/order.dart'; import 'package:cake_wallet/core/new_wallet_type_arguments.dart'; @@ -469,6 +470,16 @@ Route createRoute(RouteSettings settings) { return handleRouteWithPlatformAwareness((context) => getIt.get(), settings: settings); + case Routes.newReceivePage: + if (FeatureFlag.hasNewUi) { + return handleRouteWithPlatformAwareness( + (context) => Material(child: getIt.get(param1: false, param2: null)), + settings: settings, + ); + } + return handleRouteWithPlatformAwareness((context) => getIt.get(), + settings: settings); + case Routes.transactionDetails: return CupertinoPageRoute( fullscreenDialog: true, diff --git a/lib/routes.dart b/lib/routes.dart index 96ac8264d..236196bf7 100644 --- a/lib/routes.dart +++ b/lib/routes.dart @@ -71,6 +71,7 @@ class Routes { static const unspentCoinsList = '/unspent_coins_list'; static const unspentCoinsDetails = '/unspent_coins_details'; static const addressPage = '/address_page'; + static const newReceivePage = '/new_receive_page'; static const fullscreenQR = '/fullscreen_qr'; static const cakePayWelcomePage = '/cake_pay_welcome_page'; static const cakePayLoginPage = '/cake_pay_login_page'; diff --git a/lib/view_model/link_view_model.dart b/lib/view_model/link_view_model.dart index a9e742733..f14718ec5 100644 --- a/lib/view_model/link_view_model.dart +++ b/lib/view_model/link_view_model.dart @@ -47,7 +47,7 @@ class LinkViewModel { case 'send': return Routes.send; case 'receive': - return Routes.addressPage; + return Routes.newReceivePage; default: return null; }