Skip to content

Commit

Permalink
clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
andreasgriffin committed Aug 29, 2024
1 parent 79378cc commit 918dcda
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions bdk-ffi/src/bitcoin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ use bdk_wallet::bitcoin::consensus::encode::serialize;
use bdk_wallet::bitcoin::consensus::Decodable;
use bdk_wallet::bitcoin::io::Cursor;
use bdk_wallet::bitcoin::psbt::ExtractTxError;
use bdk_wallet::bitcoin::secp256k1::Secp256k1;
use bdk_wallet::bitcoin::Address as BdkAddress;
use bdk_wallet::bitcoin::Amount as BdkAmount;
use bdk_wallet::bitcoin::FeeRate as BdkFeeRate;
Expand All @@ -21,7 +22,6 @@ use bdk_wallet::bitcoin::TxIn as BdkTxIn;
use bdk_wallet::bitcoin::TxOut as BdkTxOut;
use bdk_wallet::bitcoin::Txid;
use bdk_wallet::miniscript::psbt::PsbtExt as MiniscriptPsbtExt;
use bdk_wallet::bitcoin::secp256k1::Secp256k1;

use std::fmt::Display;
use std::ops::Deref;
Expand Down Expand Up @@ -229,16 +229,10 @@ impl Psbt {
let secp = Secp256k1::new();
let result = self.0.lock().unwrap().clone().finalize(&secp);
match result {
Ok(psbt) => {
Ok(Arc::new( Psbt::from(psbt)))
},
Err((_psbt, _errors)) => {
Err(PsbtError::FinalizeError)
}
Ok(psbt) => Ok(Arc::new(Psbt::from(psbt))),
Err((_psbt, _errors)) => Err(PsbtError::FinalizeError),
}
}



pub(crate) fn extract_tx(&self) -> Result<Arc<Transaction>, ExtractTxError> {
let tx: BdkTransaction = self.0.lock().unwrap().clone().extract_tx()?;
Expand Down

0 comments on commit 918dcda

Please sign in to comment.