Skip to content

Commit

Permalink
refactor(best_orders): match should be set without using _ as an op…
Browse files Browse the repository at this point in the history
…tion to prevent future errors
  • Loading branch information
rozhkovdmitrii committed Jun 9, 2023
1 parent face1b7 commit 4f1f5c2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mm2src/mm2_main/src/lp_ordermatch/best_orders.rs
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ impl HttpStatusCode for BestOrdersRpcError {
fn status_code(&self) -> StatusCode {
match self {
BestOrdersRpcError::CoinIsWalletOnly(_) => StatusCode::BAD_REQUEST,
_ => StatusCode::INTERNAL_SERVER_ERROR,
BestOrdersRpcError::P2PError(_) | BestOrdersRpcError::CtxError(_) => StatusCode::INTERNAL_SERVER_ERROR,
}
}
}
Expand Down Expand Up @@ -404,7 +404,7 @@ fn mm2_internal_pubkey_hex(ctx: &MmArc) -> Result<Option<String>, MmError<BestOr
match CryptoCtx::from_ctx(ctx).discard_mm_trace() {
Ok(crypto_ctx) => Ok(Some(crypto_ctx.mm2_internal_pubkey_hex())),
Err(CryptoCtxError::NotInitialized) => Ok(None),
Err(other) => MmError::err(BestOrdersRpcError::CtxError(format!("{}", other))),
Err(other) => MmError::err(BestOrdersRpcError::CtxError(other.to_string())),
}
}

Expand Down

0 comments on commit 4f1f5c2

Please sign in to comment.