Skip to content

Commit

Permalink
Some cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
raphjaph committed Mar 1, 2025
1 parent fe48f63 commit 2eafde1
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 13 deletions.
1 change: 0 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ use {
tally::Tally,
},
anyhow::{anyhow, bail, ensure, Context, Error},
bdk_wallet::{self as bdk, KeychainKind, PersistedWallet},
bip39::Mnemonic,
bitcoin::{
address::{Address, NetworkUnchecked},
Expand Down
8 changes: 6 additions & 2 deletions src/subcommand/wallet/descriptors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,11 @@ pub struct Output {

pub(crate) fn run(wallet: Wallet) -> SubcommandResult {
Ok(Some(Box::new(Output {
descriptor: wallet.get_descriptor(KeychainKind::External)?.to_string(),
change_descriptor: wallet.get_descriptor(KeychainKind::Internal)?.to_string(),
descriptor: wallet
.get_descriptor(bdk_wallet::KeychainKind::External)?
.to_string(),
change_descriptor: wallet
.get_descriptor(bdk_wallet::KeychainKind::Internal)?
.to_string(),
})))
}
4 changes: 3 additions & 1 deletion src/wallet.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
use {
super::*,
batch::ParentInfo,
bdk_wallet::keys::KeyMap,
bdk_wallet::{
self as bdk, keys::KeyMap, ChangeSet, KeychainKind, PersistedWallet, WalletPersister,
},
bitcoin::{
bip32::{ChildNumber, DerivationPath, Xpriv},
psbt::Psbt,
Expand Down
17 changes: 8 additions & 9 deletions src/wallet/database.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
use {
super::*,
bdk::{ChangeSet, WalletPersister},
std::ops::Deref,
// std::ops::Deref,
};

pub(crate) struct Persister(pub(crate) Arc<Database>);
Expand Down Expand Up @@ -37,13 +36,13 @@ impl WalletPersister for Persister {
}
}

impl Deref for Persister {
type Target = Database;

fn deref(&self) -> &Self::Target {
&self.0
}
}
//impl Deref for Persister {
// type Target = Database;
//
// fn deref(&self) -> &Self::Target {
// &self.0
// }
//}

pub(crate) fn create_database(wallet_name: &String, settings: &Settings) -> Result<Database> {
let path = settings
Expand Down

0 comments on commit 2eafde1

Please sign in to comment.