mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2025-05-13 09:52:14 +00:00
* feat: Enhance Wallet Groups Implementation by using hashedIdentifiers instead of parentAddresses * fix: Call updateWalletGroups even if group has an hash identifier * feat: Add secrets to workflow * feat: Enhance Wallet Groups Implementation by using hashedIdentifiers instead of parentAddresses * Handle wallet grouping edgecase where wallet is restored via non seed medium * fix: Valid wallet/wallet groups not showing up when choosing wallet/groups for creating new wallets
22 lines
641 B
Dart
22 lines
641 B
Dart
import 'package:cw_core/wallet_info.dart';
|
|
|
|
class WalletGroup {
|
|
WalletGroup(this.groupKey) : wallets = [];
|
|
|
|
/// Primary identifier for the group. Previously was `parentAddress`.
|
|
/// Now we store either the wallet's hash OR fallback to parentAddress/address.
|
|
final String groupKey;
|
|
|
|
/// Child wallets that share the same group key
|
|
final List<WalletInfo> wallets;
|
|
|
|
/// Custom name for the group, editable for multi-child wallet groups
|
|
String? groupName;
|
|
|
|
/// Allows editing of the group name (only for multi-child groups).
|
|
void setCustomName(String name) {
|
|
if (wallets.length > 1) {
|
|
groupName = name;
|
|
}
|
|
}
|
|
}
|