# checks before pushing
pre-push:
- cargo build --features default
cargo test --features default
- cargo build --no-default-features
cargo test --no-default-features
- cargo build --all-features
cargo test --all-features
cargo clippy --no-default-features --all-targets -- -D warnings
cargo clippy --all-features --all-targets -- -D warnings
.wallets
.iter()
.map(|(name, wallet_config)| {
+ #[allow(unused_mut)]
let mut wallet_json = json!({
"name": name,
"network": wallet_config.network,
return Err(ImplementationError::from("Cannot find the transaction in the mempool or the blockchain"));
};
- let is_seen = match tx_details.chain_position {
- bdk_wallet::chain::ChainPosition::Confirmed { .. } => true,
- bdk_wallet::chain::ChainPosition::Unconfirmed { first_seen: Some(_), .. } => true,
- _ => false
- };
+ let is_seen = matches!(tx_details.chain_position, bdk_wallet::chain::ChainPosition::Confirmed { .. } | bdk_wallet::chain::ChainPosition::Unconfirmed { first_seen: Some(_), .. });
if is_seen {
return Ok(Some(tx_details.tx.as_ref().clone()));
}
- return Err(ImplementationError::from("Cannot find the transaction in the mempool or the blockchain"));
+ Err(ImplementationError::from("Cannot find the transaction in the mempool or the blockchain"))
},
|outpoint| {
let utxo = self.wallet.get_utxo(outpoint);
},
#[cfg(feature = "cbf")]
- KyotoClient { client: KyotoClientHandle },
+ KyotoClient { client: Box<KyotoClientHandle> },
}
/// Handle for the Kyoto client after the node has been started.
}
#[cfg(feature = "esplora")]
ClientType::Esplora => {
- let client = bdk_esplora::esplora_client::Builder::new(&url).build_async()?;
+ let client = bdk_esplora::esplora_client::Builder::new(url).build_async()?;
BlockchainClient::Esplora {
client: Box::new(client),
parallel_requests: wallet_opts.parallel_requests,
);
BlockchainClient::KyotoClient {
- client: KyotoClientHandle {
+ client: Box::new(KyotoClientHandle {
requester,
update_subscriber: tokio::sync::Mutex::new(update_subscriber),
- },
+ }),
}
}
};