rename bitcoin_derivations -> electrum_derivations

This commit is contained in:
Matthew Fosse 2024-04-29 16:12:18 -07:00
parent 09da014dd8
commit fcb9f0d77e
3 changed files with 5 additions and 5 deletions

View file

@ -1,6 +1,6 @@
import 'package:cw_core/wallet_info.dart';
Map<DerivationType, List<DerivationInfo>> bitcoin_derivations = {
Map<DerivationType, List<DerivationInfo>> electrum_derivations = {
DerivationType.electrum: [
DerivationInfo(
derivationType: DerivationType.electrum,

View file

@ -316,7 +316,7 @@ class CWBitcoin extends Bitcoin {
break;
}
for (DerivationType dType in bitcoin_derivations.keys) {
for (DerivationType dType in electrum_derivations.keys) {
late Uint8List seedBytes;
if (dType == DerivationType.electrum) {
seedBytes = await mnemonicToSeedBytes(mnemonic);
@ -324,7 +324,7 @@ class CWBitcoin extends Bitcoin {
seedBytes = bip39.mnemonicToSeed(mnemonic, passphrase: passphrase ?? '');
}
for (DerivationInfo dInfo in bitcoin_derivations[dType]!) {
for (DerivationInfo dInfo in electrum_derivations[dType]!) {
try {
DerivationInfo dInfoCopy = DerivationInfo(
derivationType: dInfo.derivationType,
@ -337,7 +337,7 @@ class CWBitcoin extends Bitcoin {
int derivationDepth = _countOccurrences(derivationPath, "/");
// the correct derivation depth is dependant on the derivation type:
// the derivation paths defined in bitcoin_derivations are at the ROOT level, i.e.:
// the derivation paths defined in electrum_derivations are at the ROOT level, i.e.:
// electrum's format doesn't specify subaddresses, just subaccounts:
// for BIP44

View file

@ -84,7 +84,7 @@ import 'package:hive/hive.dart';
const bitcoinCWHeaders = """
import 'package:cw_bitcoin/utils.dart';
import 'package:cw_bitcoin/litecoin_network.dart';
import 'package:cw_bitcoin/bitcoin_derivations.dart';
import 'package:cw_bitcoin/electrum_derivations.dart';
import 'package:cw_bitcoin/electrum.dart';
import 'package:cw_bitcoin/pending_bitcoin_transaction.dart';
import 'package:cw_bitcoin/bitcoin_receive_page_option.dart';