diff --git a/lib/di.dart b/lib/di.dart index 5e5417b34..0008ad8fd 100644 --- a/lib/di.dart +++ b/lib/di.dart @@ -378,7 +378,11 @@ Future setup({ getIt.registerFactory(() => NewWalletTypeViewModel(_walletInfoSource)); getIt.registerFactory( - () => WalletManager(_walletInfoSource, getIt.get()), + () { + final instance = WalletManager(_walletInfoSource, getIt.get()); + instance.updateWalletGroups(); + return instance; + }, ); getIt.registerFactoryParam( diff --git a/lib/src/screens/wallet/wallet_edit_page.dart b/lib/src/screens/wallet/wallet_edit_page.dart index 9515e58c3..340091a1e 100644 --- a/lib/src/screens/wallet/wallet_edit_page.dart +++ b/lib/src/screens/wallet/wallet_edit_page.dart @@ -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, @@ -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( context: context, builder: (_) {