minor fixes

OmarHatem committed Jul 29, 2025 at 17:16 UTC c4a1fb2a7c3eb1f726886b44903ba78b4e52e02a
3 files changed +9 -25
lib/src/screens/auth/auth_page.dart
+3 -21
@@ -1,6 +1,5 @@
1 import 'package:another_flushbar/flushbar.dart';
2 import 'package:cake_wallet/utils/show_bar.dart';
3 -import 'package:cake_wallet/utils/show_pop_up.dart';
3 import 'package:mobx/mobx.dart';
4 import 'package:flutter/material.dart';
5 import 'package:flutter/cupertino.dart';
@@ -10,8 +9,6 @@ import 'package:cake_wallet/view_model/auth_view_model.dart';
9 import 'package:cake_wallet/src/screens/pin_code/pin_code.dart';
10 import 'package:cake_wallet/src/screens/pin_code/pin_code_widget.dart';
11 import 'package:cake_wallet/core/execution_state.dart';
13 -import 'package:cake_wallet/src/widgets/alert_with_two_actions.dart';
14 -import 'package:flutter/services.dart';
12
13 typedef OnAuthenticationFinished = void Function(bool, AuthPageState);
14
@@ -64,7 +61,9 @@ class AuthPagePinCodeStateImpl extends AuthPageState<AuthPage> {
61 WidgetsBinding.instance.addPostFrameCallback((_) async {
62 _pinCodeKey.currentState?.clear();
63 dismissFlushBar(_authBar);
67 - showBar<void>(context, S.of(context).failed_authentication(state.error));
64 + if (context.mounted) {
65 + showBar<void>(context, S.of(context).failed_authentication(state.error));
66 + }
67 widget.onAuthenticationFinished(false, this);
68 });
69 }
@@ -89,23 +88,6 @@ class AuthPagePinCodeStateImpl extends AuthPageState<AuthPage> {
88 super.initState();
89 }
90
92 - Future<void> _showSeedsPopup(BuildContext context, String message) async {
93 - await showPopUp<void>(
94 - context: context,
95 - builder: (BuildContext context) {
96 - return AlertWithTwoActions(
97 - alertTitle: "Corrupted seeds",
98 - alertContent: message,
99 - leftButtonText: S.of(context).copy,
100 - rightButtonText: S.of(context).ok,
101 - actionLeftButton: () async {
102 - await Clipboard.setData(ClipboardData(text: message));
103 - },
104 - actionRightButton: () => Navigator.of(context).pop(),
105 - );
106 - });
107 - }
108 -
91 @override
92 void dispose() {
93 _reaction?.reaction.dispose();
lib/src/screens/dashboard/sign_page.dart
+5 -3
@@ -159,12 +159,14 @@ class SignPage extends BasePage {
159 WidgetsBinding.instance.addPostFrameCallback((_) {
160 showPopUp<void>(
161 context: context,
162 - builder: (_) {
162 + builder: (_context) {
163 return AlertWithOneAction(
164 alertTitle: S.current.successful,
165 alertContent: S.current.message_verified,
166 - buttonText: S.of(context).ok,
167 - buttonAction: () => Navigator.of(context).pop(),
166 + buttonText: S.of(_context).ok,
167 + buttonAction: () {
168 + if (_context.mounted) Navigator.of(_context).pop();
169 + },
170 );
171 });
172 });
scripts/windows/build_exe_installer.iss
+1 -1
@@ -1,5 +1,5 @@
1 #define MyAppName "Cake Wallet"
2 -#define MyAppVersion "5.1.2"
2 +#define MyAppVersion "5.2.0"
3 #define MyAppPublisher "Cake Labs LLC"
4 #define MyAppURL "https://cakewallet.com/"
5 #define MyAppExeName "CakeWallet.exe"