mirror of
https://github.com/comit-network/xmr-btc-swap.git
synced 2025-12-16 09:03:54 -05:00
Bump bdk from 0.6.0 to 0.7.0
Bumps [bdk](https://github.com/bitcoindevkit/bdk) from 0.6.0 to 0.7.0. - [Release notes](https://github.com/bitcoindevkit/bdk/releases) - [Changelog](https://github.com/bitcoindevkit/bdk/blob/v0.7.0/CHANGELOG.md) - [Commits](https://github.com/bitcoindevkit/bdk/compare/v0.6.0...v0.7.0) Signed-off-by: dependabot[bot] <support@github.com>
This commit is contained in:
parent
baf5a0896e
commit
6badf09394
3 changed files with 14 additions and 7 deletions
|
|
@ -10,7 +10,7 @@ use bdk::descriptor::Segwitv0;
|
|||
use bdk::electrum_client::{ElectrumApi, GetHistoryRes};
|
||||
use bdk::keys::DerivableKey;
|
||||
use bdk::wallet::AddressIndex;
|
||||
use bdk::{FeeRate, KeychainKind};
|
||||
use bdk::{FeeRate, KeychainKind, SignOptions};
|
||||
use bitcoin::{Network, Script};
|
||||
use reqwest::Url;
|
||||
use rust_decimal::prelude::*;
|
||||
|
|
@ -246,14 +246,21 @@ where
|
|||
C: EstimateFeeRate,
|
||||
D: BatchDatabase,
|
||||
{
|
||||
pub async fn sign_and_finalize(&self, psbt: PartiallySignedTransaction) -> Result<Transaction> {
|
||||
let (signed_psbt, finalized) = self.wallet.lock().await.sign(psbt, None)?;
|
||||
pub async fn sign_and_finalize(
|
||||
&self,
|
||||
mut psbt: PartiallySignedTransaction,
|
||||
) -> Result<Transaction> {
|
||||
let finalized = self
|
||||
.wallet
|
||||
.lock()
|
||||
.await
|
||||
.sign(&mut psbt, SignOptions::default())?;
|
||||
|
||||
if !finalized {
|
||||
bail!("PSBT is not finalized")
|
||||
}
|
||||
|
||||
let tx = signed_psbt.extract_tx();
|
||||
let tx = psbt.extract_tx();
|
||||
|
||||
Ok(tx)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue