fix: wallet grouping eating wallets (#2203)

This commit is contained in:
cyan
2025-04-14 18:47:31 +02:00
committed by GitHub
parent 5f4dc95ca5
commit 87207c61ba
2 changed files with 9 additions and 40 deletions
+7 -1
View File
@@ -1,3 +1,5 @@
import 'dart:math';
import 'package:cake_wallet/entities/hash_wallet_identifier.dart';
import 'package:cake_wallet/entities/wallet_group.dart';
import 'package:cw_core/wallet_base.dart';
@@ -33,7 +35,11 @@ class WalletManager {
}
// Fallback to old logic
return walletInfo.parentAddress ?? walletInfo.address;
final address = walletInfo.parentAddress ?? walletInfo.address;
if (address.isEmpty) {
return Random().nextInt(100000).toString();
}
return address;
}
WalletGroup _getOrCreateGroup(String groupKey) {