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

@ -160,7 +160,7 @@ abstract class Bitcoin {
String? passphrase,
});
WalletCredentials createBitcoinRestoreWalletFromWIFCredentials({required String name, required String password, required String wif, WalletInfo? walletInfo});
WalletCredentials createBitcoinNewWalletCredentials({required String name, WalletInfo? walletInfo, String? password, String? passphrase, String? mnemonic, String? parentAddress});
WalletCredentials createBitcoinNewWalletCredentials({required String name, WalletInfo? walletInfo, String? password, String? passphrase, String? mnemonic});
WalletCredentials createBitcoinHardwareWalletCredentials({required String name, required HardwareAccountData accountData, WalletInfo? walletInfo});
List<String> getWordList();
Map<String, String> getWalletKeys(Object wallet);
@ -882,7 +882,7 @@ import 'package:eth_sig_util/util/utils.dart';
abstract class Ethereum {
List<String> getEthereumWordList(String language);
WalletService createEthereumWalletService(Box<WalletInfo> walletInfoSource, bool isDirect);
WalletCredentials createEthereumNewWalletCredentials({required String name, WalletInfo? walletInfo, String? password, String? mnemonic, String? parentAddress, String? passphrase});
WalletCredentials createEthereumNewWalletCredentials({required String name, WalletInfo? walletInfo, String? password, String? mnemonic, String? passphrase});
WalletCredentials createEthereumRestoreWalletFromSeedCredentials({required String name, required String mnemonic, required String password, String? passphrase});
WalletCredentials createEthereumRestoreWalletFromPrivateKey({required String name, required String privateKey, required String password});
WalletCredentials createEthereumHardwareWalletCredentials({required String name, required HardwareAccountData hwAccountData, WalletInfo? walletInfo});
@ -989,7 +989,7 @@ import 'package:eth_sig_util/util/utils.dart';
abstract class Polygon {
List<String> getPolygonWordList(String language);
WalletService createPolygonWalletService(Box<WalletInfo> walletInfoSource, bool isDirect);
WalletCredentials createPolygonNewWalletCredentials({required String name, WalletInfo? walletInfo, String? password, String? mnemonic, String? parentAddress, String? passphrase});
WalletCredentials createPolygonNewWalletCredentials({required String name, WalletInfo? walletInfo, String? password, String? mnemonic, String? passphrase});
WalletCredentials createPolygonRestoreWalletFromSeedCredentials({required String name, required String mnemonic, required String password, String? passphrase});
WalletCredentials createPolygonRestoreWalletFromPrivateKey({required String name, required String privateKey, required String password});
WalletCredentials createPolygonHardwareWalletCredentials({required String name, required HardwareAccountData hwAccountData, WalletInfo? walletInfo});
@ -1077,7 +1077,7 @@ abstract class BitcoinCash {
Box<WalletInfo> walletInfoSource, Box<UnspentCoinsInfo> unspentCoinSource, bool isDirect);
WalletCredentials createBitcoinCashNewWalletCredentials(
{required String name, WalletInfo? walletInfo, String? password, String? passphrase, String? mnemonic, String? parentAddress});
{required String name, WalletInfo? walletInfo, String? password, String? passphrase, String? mnemonic});
WalletCredentials createBitcoinCashRestoreWalletFromSeedCredentials(
{required String name, required String mnemonic, required String password, String? passphrase});
@ -1161,7 +1161,6 @@ abstract class Nano {
required String name,
String? password,
String? mnemonic,
String? parentAddress,
WalletInfo? walletInfo,
String? passphrase,
});
@ -1281,7 +1280,7 @@ abstract class Solana {
List<String> getSolanaWordList(String language);
WalletService createSolanaWalletService(Box<WalletInfo> walletInfoSource, bool isDirect);
WalletCredentials createSolanaNewWalletCredentials(
{required String name, WalletInfo? walletInfo, String? password, String? mnemonic, String? parentAddress, String? passphrase});
{required String name, WalletInfo? walletInfo, String? password, String? mnemonic, String? passphrase});
WalletCredentials createSolanaRestoreWalletFromSeedCredentials(
{required String name, required String mnemonic, required String password, String? passphrase});
WalletCredentials createSolanaRestoreWalletFromPrivateKey(
@ -1369,7 +1368,7 @@ import 'package:cw_tron/default_tron_tokens.dart';
abstract class Tron {
List<String> getTronWordList(String language);
WalletService createTronWalletService(Box<WalletInfo> walletInfoSource, bool isDirect);
WalletCredentials createTronNewWalletCredentials({required String name, WalletInfo? walletInfo, String? password, String? mnemonic, String? parentAddress, String? passphrase});
WalletCredentials createTronNewWalletCredentials({required String name, WalletInfo? walletInfo, String? password, String? mnemonic, String? passphrase});
WalletCredentials createTronRestoreWalletFromSeedCredentials({required String name, required String mnemonic, required String password, String? passphrase});
WalletCredentials createTronRestoreWalletFromPrivateKey({required String name, required String privateKey, required String password});
String getAddress(WalletBase wallet);

View file

@ -77,6 +77,7 @@ class SecretKey {
SecretKey('moneroTestWalletBlockHeight', () => ''),
SecretKey('chainflipApiKey', () => ''),
SecretKey('chainflipAffiliateFee', () => ''),
SecretKey('walletGroupSalt', () => hex.encode(encrypt.Key.fromSecureRandom(16).bytes)),
];
static final evmChainsSecrets = [
@ -88,6 +89,7 @@ class SecretKey {
static final solanaSecrets = [
SecretKey('ankrApiKey', () => ''),
SecretKey('nowNodesApiKey', () => ''),
SecretKey('chainStackApiKey', () => ''),
];