diff --git a/lib/app/router/router.dart b/lib/app/router/router.dart index bbea9202d..336d2e18b 100644 --- a/lib/app/router/router.dart +++ b/lib/app/router/router.dart @@ -76,6 +76,8 @@ class AppRouter { // Get root app route final rootAppRoute = getRootAppRoute(fullPath: fullPath); + final segments = AppRoute.pathSegments(fullPath: fullPath); + final isSubroute = segments.length > 1; // Get saved subroute for the root app route (if any) final savedSubroute = _savedSubroutes[rootAppRoute]; @@ -103,7 +105,8 @@ class AppRouter { // navigates to another root app route and returns back to the previous // root app route using bottom tab bar. In this case, the subroute // should be restored. - if (rootAppRouteChaned && savedSubroute != null) { + // Skip subroute restoration if navigatad directry to subrout. + if (rootAppRouteChaned && !isSubroute && savedSubroute != null) { return savedSubroute; } diff --git a/lib/feature/wallet/widgets/select_account/select_account_wm.dart b/lib/feature/wallet/widgets/select_account/select_account_wm.dart index c8388426a..77e832531 100644 --- a/lib/feature/wallet/widgets/select_account/select_account_wm.dart +++ b/lib/feature/wallet/widgets/select_account/select_account_wm.dart @@ -87,9 +87,7 @@ class SelectAccountWidgetModel void onManageSeedsAndAccounts() { Navigator.of(context).pop(); - context - ..goNamed(AppRoute.profile.name) - ..goFurther(AppRoute.manageSeedsAccounts.path); + context.goNamed(AppRoute.manageSeedsAccounts.name); } ListenableState getBalanceEntity(KeyAccount account) {