Browse Source
Don't panic in endpoints
Does not tackle fixing previously already existing endpoints.
upload-correct-windows-binary
Daniel Karzel
3 years ago
No known key found for this signature in database
GPG Key ID: 30C3FC2E438ADB6E
1 changed files with
3 additions and
2 deletions
-
daemon/src/routes_taker.rs
|
@ -120,13 +120,14 @@ pub async fn post_cfd_action( |
|
|
) -> Result<status::Accepted<()>, status::BadRequest<String>> { |
|
|
) -> Result<status::Accepted<()>, status::BadRequest<String>> { |
|
|
match action { |
|
|
match action { |
|
|
CfdAction::Accept | CfdAction::Reject => { |
|
|
CfdAction::Accept | CfdAction::Reject => { |
|
|
unreachable!("The taker does not accept and reject"); |
|
|
return Err(status::BadRequest(None)); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
CfdAction::Commit => { |
|
|
CfdAction::Commit => { |
|
|
cfd_actor_address |
|
|
cfd_actor_address |
|
|
.do_send_async(taker_cfd::Commit { order_id: id }) |
|
|
.do_send_async(taker_cfd::Commit { order_id: id }) |
|
|
.await |
|
|
.await |
|
|
.expect("actor to always be available"); |
|
|
.map_err(|e| status::BadRequest(Some(e.to_string())))?; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|