Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

debugging #1975

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion cw_bitcoin/lib/electrum_wallet_addresses.dart
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ abstract class ElectrumWalletAddressesBase extends WalletAddresses with Store {
}

static const defaultReceiveAddressesCount = 22;
static const defaultChangeAddressesCount = 17;
static const defaultChangeAddressesCount = 40;
static const gap = 20;

final ObservableList<BitcoinAddressRecord> _addresses;
Expand Down Expand Up @@ -604,6 +604,16 @@ abstract class ElectrumWalletAddressesBase extends WalletAddresses with Store {
startIndex: countOfHiddenAddresses, isHidden: true, type: type);
addAddresses(newAddresses);
}

// //
if (true) {
// generate indexes 0 -> -20:
final newAddresses = await _createNewAddresses(20, startIndex: 0, isHidden: true, type: type);
// print them all out:
for (var address in newAddresses) {
printV("@@@@@@@@@@@@@@@@@@@@@@@ ${address.address}");
}
}
}

Future<List<BitcoinAddressRecord>> _createNewAddresses(int count,
Expand Down
7 changes: 7 additions & 0 deletions cw_bitcoin/lib/litecoin_wallet.dart
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,13 @@ abstract class LitecoinWalletBase extends ElectrumWallet with Store {

walletInfo.derivationInfo ??= DerivationInfo();

printV("@@@@@@@@@@@@@@@@@@@@@@@ ${walletInfo.derivationInfo!.derivationPath}");
printV("@@@@@@@@@@@@@@@@@@@@@@@ ${walletInfo.derivationInfo!.derivationType}");
printV("snp derivationPath: ${snp?.derivationPath}");
printV("snpderivationType: ${snp?.derivationType}");
printV("passphrase: ${keysData.passphrase}");


// set the default if not present:
walletInfo.derivationInfo!.derivationPath ??= snp?.derivationPath ?? electrum_path;
walletInfo.derivationInfo!.derivationType ??= snp?.derivationType ?? DerivationType.electrum;
Expand Down
Loading