CW-843: Enhance Wallet Groups Implementation (#2045)

* 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
This commit is contained in:
David Adegoke 2025-03-06 01:25:38 +01:00 committed by GitHub
parent e596c19b40
commit 09f20b2a7b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
35 changed files with 181 additions and 123 deletions

View file

@ -10,7 +10,6 @@ abstract class WalletCredentials {
this.passphrase,
this.derivationInfo,
this.hardwareWalletType,
this.parentAddress,
}) {
if (this.walletInfo != null && derivationInfo != null) {
this.walletInfo!.derivationInfo = derivationInfo;
@ -19,7 +18,6 @@ abstract class WalletCredentials {
final String name;
final int? height;
String? parentAddress;
int? seedPhraseLength;
String? password;
String? passphrase;

View file

@ -81,6 +81,8 @@ class WalletInfo extends HiveObject {
this.derivationInfo,
this.hardwareWalletType,
this.parentAddress,
this.hashedWalletIdentifier,
this.isNonSeedWallet,
) : _yatLastUsedAddressController = StreamController<String>.broadcast();
factory WalletInfo.external({
@ -99,6 +101,8 @@ class WalletInfo extends HiveObject {
DerivationInfo? derivationInfo,
HardwareWalletType? hardwareWalletType,
String? parentAddress,
String? hashedWalletIdentifier,
bool? isNonSeedWallet,
}) {
return WalletInfo(
id,
@ -116,6 +120,8 @@ class WalletInfo extends HiveObject {
derivationInfo,
hardwareWalletType,
parentAddress,
hashedWalletIdentifier,
isNonSeedWallet ?? false,
);
}
@ -196,8 +202,11 @@ class WalletInfo extends HiveObject {
@HiveField(24)
List<String>? manualAddresses;
@HiveField(25)
String? hashedWalletIdentifier;
@HiveField(26, defaultValue: false)
bool isNonSeedWallet;
String get yatLastUsedAddress => yatLastUsedAddressRaw ?? '';