mirror of
https://github.com/RoboSats/taptrade-core.git
synced 2025-07-19 09:13:39 +00:00
cargo clippy
This commit is contained in:
@ -22,7 +22,7 @@ async fn receive_order(
|
||||
Extension(coordinator): Extension<Arc<Coordinator>>,
|
||||
Json(offer): Json<OfferRequest>,
|
||||
) -> Result<Response, AppError> {
|
||||
if let Err(_) = offer.validate() {
|
||||
if offer.validate().is_err() {
|
||||
Ok(StatusCode::BAD_REQUEST.into_response())
|
||||
} else {
|
||||
let bond_requirements = process_order(coordinator, &offer).await?;
|
||||
|
@ -78,7 +78,7 @@ impl KeyspendContext {
|
||||
let agg_keyspend_pk: musig2::KeyAggContext =
|
||||
wallet::aggregate_musig_pubkeys(maker_pk, taker_pk)?;
|
||||
let agg_nonce: MusigAggNonce =
|
||||
coordinator_utils::agg_hex_musig_nonces(&maker_nonce, &taker_nonce)?;
|
||||
coordinator_utils::agg_hex_musig_nonces(maker_nonce, taker_nonce)?;
|
||||
let keyspend_psbt = PartiallySignedTransaction::from_str(keyspend_psbt)?;
|
||||
|
||||
let partial_maker_sig = PartialSignature::from_hex(maker_sig)?;
|
||||
@ -120,6 +120,7 @@ impl KeyspendContext {
|
||||
}
|
||||
|
||||
impl PayoutData {
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
pub fn new_from_strings(
|
||||
escrow_output_descriptor: &str,
|
||||
payout_address_maker: &str,
|
||||
|
@ -104,7 +104,7 @@ pub async fn handle_taker_bond(
|
||||
debug!("\nTaker bond validation successful");
|
||||
|
||||
let escrow_output_data = wallet
|
||||
.create_escrow_psbt(database, &payload)
|
||||
.create_escrow_psbt(database, payload)
|
||||
.await
|
||||
.map_err(|e| BondError::CoordinatorError(e.to_string()))?;
|
||||
debug!(
|
||||
|
@ -677,7 +677,7 @@ impl CoordinatorDB {
|
||||
};
|
||||
|
||||
if is_already_there {
|
||||
return Ok(false);
|
||||
Ok(false)
|
||||
} else {
|
||||
let query = if is_maker {
|
||||
"UPDATE taken_offers SET signed_escrow_psbt_hex_maker = ? WHERE offer_id = ?"
|
||||
|
Reference in New Issue
Block a user