Browse Source

Rename TakeOrder to TakeOffer

fix-bad-api-calls
Philipp Hoenisch 3 years ago
parent
commit
822edc206d
No known key found for this signature in database GPG Key ID: E5F8E74C672BC666
  1. 2
      daemon/src/routes_taker.rs
  2. 5
      daemon/src/taker_cfd_actor.rs

2
daemon/src/routes_taker.rs

@ -67,7 +67,7 @@ pub async fn post_order_request(
cfd_actor_inbox: &State<mpsc::UnboundedSender<taker_cfd_actor::Command>>,
) {
cfd_actor_inbox
.send(taker_cfd_actor::Command::TakeOrder {
.send(taker_cfd_actor::Command::TakeOffer {
order_id: cfd_order_request.order_id,
quantity: cfd_order_request.quantity,
})

5
daemon/src/taker_cfd_actor.rs

@ -16,8 +16,7 @@ use tokio::sync::{mpsc, watch};
#[allow(clippy::large_enum_variant)]
pub enum Command {
SyncWallet,
// TODO: should this be TakeOffer ?
TakeOrder { order_id: OrderId, quantity: Usd },
TakeOffer { order_id: OrderId, quantity: Usd },
NewOrder(Option<Order>),
OrderAccepted(OrderId),
OrderRejected(OrderId),
@ -54,7 +53,7 @@ pub fn new(
let wallet_info = wallet.sync().await.unwrap();
wallet_feed_sender.send(wallet_info).unwrap();
}
Command::TakeOrder { order_id, quantity } => {
Command::TakeOffer { order_id, quantity } => {
let mut conn = db.acquire().await.unwrap();
let current_order = load_order_by_id(order_id, &mut conn).await.unwrap();

Loading…
Cancel
Save