From ef70848b48dc03a2c2a972d0708d77765284ec0f Mon Sep 17 00:00:00 2001 From: Matthew Fosse Date: Fri, 28 Jun 2024 14:44:18 -0700 Subject: [PATCH] correctly use bip39/electrum seed to bytes functions --- cw_lightning/lib/lightning_wallet.dart | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/cw_lightning/lib/lightning_wallet.dart b/cw_lightning/lib/lightning_wallet.dart index b2a94724c..93eb28a9a 100644 --- a/cw_lightning/lib/lightning_wallet.dart +++ b/cw_lightning/lib/lightning_wallet.dart @@ -114,10 +114,10 @@ abstract class LightningWalletBase extends ElectrumWallet with Store { late final Uint8List seedBytes; // electrum: if (validateMnemonic(mnemonic)) { - seedBytes = await bip39.mnemonicToSeed(mnemonic); + seedBytes = await mnemonicToSeedBytes(mnemonic); // bip39: } else if (bip39.validateMnemonic(mnemonic)) { - seedBytes = await mnemonicToSeedBytes(mnemonic); + seedBytes = await bip39.mnemonicToSeed(mnemonic); } else { throw Exception("Invalid mnemonic!"); } @@ -143,6 +143,8 @@ abstract class LightningWalletBase extends ElectrumWallet with Store { }) async { final snp = await ElectrumWalletSnapshot.load(name, walletInfo.type, password, BitcoinNetwork.mainnet); + + print("OPENING!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"); return LightningWallet( mnemonic: snp.mnemonic!, password: password, @@ -189,8 +191,8 @@ abstract class LightningWalletBase extends ElectrumWallet with Store { case "ERROR": case "WARN": case "INFO": - // case "DEBUG": - // case "TRACE": + // case "DEBUG": + // case "TRACE": print("BREEZ:${entry.level}: ${entry.line}"); break; }