Skip to content

Commit

Permalink
Adapt
Browse files Browse the repository at this point in the history
  • Loading branch information
casey committed Mar 3, 2025
1 parent 03c89ef commit 5af934a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/wallet/wallet_constructor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,14 @@ impl WalletConstructor {
pub(crate) fn build(self) -> Result<Wallet> {
let database = Arc::new(Wallet::open_database(&self.settings, &self.name)?);

let rtx = database.begin_read()?;
let tx = 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()))
.transpose()?
.ok_or(anyhow!("couldn't load master private key from database"))?;
.ok_or_else(|| anyhow!("failed to load master private key from database"))?;

let wallet = match bdk::Wallet::load()
.check_network(self.settings.chain().network())
Expand Down

0 comments on commit 5af934a

Please sign in to comment.