Skip to content

Commit 14e5705

Browse files
Merge pull request #1027 from broxus/hotfix/EWM-TECH_1.19.1
fix(EWM-TECH): 1.19.1 (add delay & fix navigation after seed creation)
2 parents f42b4a4 + 89ff73b commit 14e5705

File tree

2 files changed

+19
-7
lines changed

2 files changed

+19
-7
lines changed

lib/feature/add_seed/create_password/screens/create_seed_password/create_seed_password_screen_wm.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,8 @@ class CreateSeedPasswordScreenWidgetModel
7272
mnemonicType: wmParams.value.mnemonicType,
7373
);
7474

75+
_loadState.accept(false);
76+
7577
if (model.isNeedBiometry) {
7678
contextSafe?.compassContinue(const EnableBiometryRouteData());
7779
} else {

lib/feature/add_seed/create_password/view/create_seed_password_profile_wm.dart

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import 'package:app/feature/profile/widgets/switch_to_seed_sheet/switch_to_seed_
1212
import 'package:app/utils/utils.dart';
1313
import 'package:elementary_helper/elementary_helper.dart';
1414
import 'package:injectable/injectable.dart';
15+
import 'package:logging/logging.dart';
1516
import 'package:nekoton_repository/nekoton_repository.dart';
1617

1718
class CreateSeedPasswordProfileWmParams {
@@ -40,6 +41,8 @@ class CreateSeedPasswordProfileWidgetModel
4041
> {
4142
CreateSeedPasswordProfileWidgetModel(super.model);
4243

44+
static final _logger = Logger('CreateSeedPasswordProfileWidgetModel');
45+
4346
late final passwordController = createTextEditingController();
4447
late final confirmController = createTextEditingController();
4548

@@ -81,14 +84,21 @@ class CreateSeedPasswordProfileWidgetModel
8184
context: context,
8285
publicKey: publicKey,
8386
);
87+
88+
_loadingState.accept(false);
89+
8490
try {
85-
contextSafe
86-
?..compassPointNamed(const ProfileRouteData())
87-
..compassPointNamed(routeData ?? const ManageSeedsAccountsRouteData());
88-
// contextSafe?.compassPointNamed(
89-
// routeData ?? const ManageSeedsAccountsRouteData(),
90-
// );
91-
} catch (_) {}
91+
contextSafe?.compassPoint(const ProfileRouteData());
92+
await Future.delayed(const Duration(milliseconds: 50), () {
93+
if (routeData != null) {
94+
contextSafe?.compassPoint(routeData);
95+
} else {
96+
contextSafe?.compassContinue(const ManageSeedsAccountsRouteData());
97+
}
98+
});
99+
} catch (e, s) {
100+
_logger.severe('Error during navigation after adding seed', e, s);
101+
}
92102
}
93103

94104
void _validate() {

0 commit comments

Comments
 (0)