We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 7bb0cf5 + ee4283a commit 7b7561bCopy full SHA for 7b7561b
src/swift_server.rs
@@ -253,7 +253,7 @@ pub async fn process_order(
253
254
if market
255
.as_ref()
256
- .is_ok_and(|m| m.status == MarketStatus::Delisted)
+ .is_ok_and(|m| matches!(m.status, MarketStatus::Delisted | MarketStatus::Settlement))
257
{
258
return Err((
259
axum::http::StatusCode::BAD_REQUEST,
@@ -433,7 +433,9 @@ pub async fn deposit_trade(
433
}
434
let mut has_place_ix = false;
435
for ix in req.deposit_tx.message.instructions() {
436
- if &ix.data[..8] == drift_idl::instructions::PlaceSignedMsgTakerOrder::DISCRIMINATOR {
+ if ix.data.len() > 8
437
+ && &ix.data[..8] == drift_idl::instructions::PlaceSignedMsgTakerOrder::DISCRIMINATOR
438
+ {
439
has_place_ix = true;
440
441
0 commit comments