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