mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2024-12-29 15:09:23 +00:00
22 lines
564 B
Dart
22 lines
564 B
Dart
|
import 'package:cw_core/wallet_info.dart';
|
||
|
|
||
|
class WalletGroup {
|
||
|
WalletGroup(this.parentAddress) : wallets = [];
|
||
|
|
||
|
/// Main identifier for each group, compulsory.
|
||
|
final String parentAddress;
|
||
|
|
||
|
/// Child wallets that share the same parent address within this group
|
||
|
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;
|
||
|
}
|
||
|
}
|
||
|
}
|