Skip to content

Commit

Permalink
fixing trade index in take sell and take buy
Browse files Browse the repository at this point in the history
  • Loading branch information
arkanoider committed Dec 9, 2024
1 parent 76b3474 commit db7e1be
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/app/take_buy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,8 @@ pub async fn take_buy_action(
order.fee = fee;
}

// Update trade index for seller
order.trade_index_seller = msg.get_inner_message_kind().trade_index;
// Timestamp order take time
order.taken_at = Timestamp::now().as_u64() as i64;

Expand Down
1 change: 1 addition & 0 deletions src/app/take_sell.rs
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ pub async fn take_sell_action(

// Add buyer pubkey to order
order.buyer_pubkey = Some(buyer_pubkey.to_string());
order.trade_index_buyer = msg.get_inner_message_kind().trade_index;
// Timestamp take order time
order.taken_at = Timestamp::now().as_u64() as i64;

Expand Down

0 comments on commit db7e1be

Please sign in to comment.