diff --git a/cw_bitcoin/lib/bitcoin_derivations.dart b/cw_bitcoin/lib/electrum_derivations.dart similarity index 98% rename from cw_bitcoin/lib/bitcoin_derivations.dart rename to cw_bitcoin/lib/electrum_derivations.dart index 576db6d6c..e2450fc5f 100644 --- a/cw_bitcoin/lib/bitcoin_derivations.dart +++ b/cw_bitcoin/lib/electrum_derivations.dart @@ -1,6 +1,6 @@ import 'package:cw_core/wallet_info.dart'; -Map> bitcoin_derivations = { +Map> electrum_derivations = { DerivationType.electrum: [ DerivationInfo( derivationType: DerivationType.electrum, diff --git a/lib/bitcoin/cw_bitcoin.dart b/lib/bitcoin/cw_bitcoin.dart index 1d6cfb71d..7ae01df1c 100644 --- a/lib/bitcoin/cw_bitcoin.dart +++ b/lib/bitcoin/cw_bitcoin.dart @@ -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 diff --git a/tool/configure.dart b/tool/configure.dart index c637aebc3..ceb0c9ccc 100644 --- a/tool/configure.dart +++ b/tool/configure.dart @@ -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';