Skip to content

Commit

Permalink
Merge branch 'main' into CW-781-improve-logging
Browse files Browse the repository at this point in the history
  • Loading branch information
MrCyjaneK authored Oct 8, 2024
2 parents a7de0ee + 62f55ae commit 923a183
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 5 additions & 1 deletion lib/di.dart
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,11 @@ Future<void> setup({
getIt.registerFactory<NewWalletTypeViewModel>(() => NewWalletTypeViewModel(_walletInfoSource));

getIt.registerFactory<WalletManager>(
() => WalletManager(_walletInfoSource, getIt.get<SharedPreferences>()),
() {
final instance = WalletManager(_walletInfoSource, getIt.get<SharedPreferences>());
instance.updateWalletGroups();
return instance;
},
);

getIt.registerFactoryParam<WalletGroupsDisplayViewModel, WalletType, void>(
Expand Down
6 changes: 3 additions & 3 deletions lib/src/screens/wallet/wallet_edit_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ import 'package:cake_wallet/src/widgets/base_text_form_field.dart';
import 'package:cake_wallet/src/screens/base_page.dart';
import 'package:flutter_mobx/flutter_mobx.dart';


class WalletEditPage extends BasePage {
WalletEditPage({
required this.pageArguments,
Expand Down Expand Up @@ -86,8 +85,9 @@ class WalletEditPage extends BasePage {
child: LoadingPrimaryButton(
onPressed: () async {
if (_formKey.currentState?.validate() ?? false) {
if (pageArguments.walletNewVM!
.nameExists(walletEditViewModel.newName)) {
if (!pageArguments.isWalletGroup &&
pageArguments.walletNewVM!
.nameExists(walletEditViewModel.newName)) {
showPopUp<void>(
context: context,
builder: (_) {
Expand Down

0 comments on commit 923a183

Please sign in to comment.