Skip to content

Commit

Permalink
Hot fix updating status (#126)
Browse files Browse the repository at this point in the history
  • Loading branch information
grunch authored Oct 6, 2023
1 parent 9da08c1 commit c3fccc6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -220,8 +220,11 @@ pub async fn update_order_event(
Some(order.created_at),
);
let order_content = publish_order.as_json()?;
let mut order = order.clone();
// update order.status with new status
order.status = status.to_string();
// We transform the order fields to tags to use in the event
let tags = order_to_tags(order);
let tags = order_to_tags(&order);
// nip33 kind with order id as identifier and order fields as tags
let event = new_event(keys, order_content, order.id.to_string(), tags)?;
let event_id = event.id.to_string();
Expand Down

0 comments on commit c3fccc6

Please sign in to comment.