Skip to content

Commit

Permalink
Adjust
Browse files Browse the repository at this point in the history
  • Loading branch information
casey committed Mar 3, 2025
1 parent 93c2904 commit c4b4240
Showing 1 changed file with 7 additions and 11 deletions.
18 changes: 7 additions & 11 deletions src/wallet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -201,9 +201,9 @@ impl Wallet {
&self,
kind: KeychainKind,
) -> Result<Descriptor<DescriptorPublicKey>> {
let rtx = self.database.begin_read()?;
let tx = self.database.begin_read()?;

let master_private_key = rtx
let master_private_key = tx
.open_table(XPRIV)?
.get(())?
.map(|xpriv| Xpriv::decode(xpriv.value().as_slice()))
Expand All @@ -217,18 +217,14 @@ impl Wallet {
}

pub(crate) fn get_receive_addresses(&mut self, n: usize) -> Vec<Address> {
let mut addresses = Vec::new();

for _ in 0..n {
addresses.push(
(0..n)
.map(|_| {
self
.wallet
.reveal_next_address(KeychainKind::External)
.address,
)
}

addresses
.address
})
.collect()
}

pub(crate) fn derive_descriptor(
Expand Down

0 comments on commit c4b4240

Please sign in to comment.