mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2025-03-23 07:38:45 +00:00
rename bitcoin_derivations -> electrum_derivations
This commit is contained in:
parent
09da014dd8
commit
fcb9f0d77e
3 changed files with 5 additions and 5 deletions
|
@ -1,6 +1,6 @@
|
||||||
import 'package:cw_core/wallet_info.dart';
|
import 'package:cw_core/wallet_info.dart';
|
||||||
|
|
||||||
Map<DerivationType, List<DerivationInfo>> bitcoin_derivations = {
|
Map<DerivationType, List<DerivationInfo>> electrum_derivations = {
|
||||||
DerivationType.electrum: [
|
DerivationType.electrum: [
|
||||||
DerivationInfo(
|
DerivationInfo(
|
||||||
derivationType: DerivationType.electrum,
|
derivationType: DerivationType.electrum,
|
|
@ -316,7 +316,7 @@ class CWBitcoin extends Bitcoin {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (DerivationType dType in bitcoin_derivations.keys) {
|
for (DerivationType dType in electrum_derivations.keys) {
|
||||||
late Uint8List seedBytes;
|
late Uint8List seedBytes;
|
||||||
if (dType == DerivationType.electrum) {
|
if (dType == DerivationType.electrum) {
|
||||||
seedBytes = await mnemonicToSeedBytes(mnemonic);
|
seedBytes = await mnemonicToSeedBytes(mnemonic);
|
||||||
|
@ -324,7 +324,7 @@ class CWBitcoin extends Bitcoin {
|
||||||
seedBytes = bip39.mnemonicToSeed(mnemonic, passphrase: passphrase ?? '');
|
seedBytes = bip39.mnemonicToSeed(mnemonic, passphrase: passphrase ?? '');
|
||||||
}
|
}
|
||||||
|
|
||||||
for (DerivationInfo dInfo in bitcoin_derivations[dType]!) {
|
for (DerivationInfo dInfo in electrum_derivations[dType]!) {
|
||||||
try {
|
try {
|
||||||
DerivationInfo dInfoCopy = DerivationInfo(
|
DerivationInfo dInfoCopy = DerivationInfo(
|
||||||
derivationType: dInfo.derivationType,
|
derivationType: dInfo.derivationType,
|
||||||
|
@ -337,7 +337,7 @@ class CWBitcoin extends Bitcoin {
|
||||||
int derivationDepth = _countOccurrences(derivationPath, "/");
|
int derivationDepth = _countOccurrences(derivationPath, "/");
|
||||||
|
|
||||||
// the correct derivation depth is dependant on the derivation type:
|
// 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:
|
// electrum's format doesn't specify subaddresses, just subaccounts:
|
||||||
|
|
||||||
// for BIP44
|
// for BIP44
|
||||||
|
|
|
@ -84,7 +84,7 @@ import 'package:hive/hive.dart';
|
||||||
const bitcoinCWHeaders = """
|
const bitcoinCWHeaders = """
|
||||||
import 'package:cw_bitcoin/utils.dart';
|
import 'package:cw_bitcoin/utils.dart';
|
||||||
import 'package:cw_bitcoin/litecoin_network.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/electrum.dart';
|
||||||
import 'package:cw_bitcoin/pending_bitcoin_transaction.dart';
|
import 'package:cw_bitcoin/pending_bitcoin_transaction.dart';
|
||||||
import 'package:cw_bitcoin/bitcoin_receive_page_option.dart';
|
import 'package:cw_bitcoin/bitcoin_receive_page_option.dart';
|
||||||
|
|
Loading…
Reference in a new issue