mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2024-12-22 11:39:22 +00:00
Allow Wallet Group Names to be the same as Wallet Names (#1730)
Some checks failed
Cache Dependencies / test (push) Has been cancelled
Some checks failed
Cache Dependencies / test (push) Has been cancelled
* fix: Issues with imaging * fix: Allow group names to be the same as wallet names * fix: Bug with wallet grouping when a wallet is minimized * fix: Bug with wallet grouping when a wallet is minimized
This commit is contained in:
parent
37b822b7f5
commit
62f55ae8f5
2 changed files with 8 additions and 4 deletions
|
@ -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>(
|
||||
|
|
|
@ -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,7 +85,8 @@ class WalletEditPage extends BasePage {
|
|||
child: LoadingPrimaryButton(
|
||||
onPressed: () async {
|
||||
if (_formKey.currentState?.validate() ?? false) {
|
||||
if (pageArguments.walletNewVM!
|
||||
if (!pageArguments.isWalletGroup &&
|
||||
pageArguments.walletNewVM!
|
||||
.nameExists(walletEditViewModel.newName)) {
|
||||
showPopUp<void>(
|
||||
context: context,
|
||||
|
|
Loading…
Reference in a new issue