Skip to content

Commit

Permalink
Add comments on order to tags and add label tag
Browse files Browse the repository at this point in the history
  • Loading branch information
grunch committed Oct 6, 2023
1 parent 1924048 commit 9da08c1
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/nip33.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,22 @@ pub fn new_event(
///
pub fn order_to_tags(order: &Order) -> Vec<(String, String)> {
let tags = vec![
// kind (k) - The order kind (buy or sell)
("k".to_string(), order.kind.to_string()),
// fiat_code (f) - The fiat code of the order
("f".to_string(), order.fiat_code.to_string()),
// status (s) - The order status
("s".to_string(), order.status.to_string()),
// amount (amt) - The amount of sats
("amt".to_string(), order.amount.to_string()),
// fiat_amount (fa) - The fiat amount
("fa".to_string(), order.fiat_amount.to_string()),
// payment_method (pm) - The payment method
("pm".to_string(), order.payment_method.to_string()),
// premium (premium) - The premium
("premium".to_string(), order.premium.to_string()),
// Label to identify this is a Mostro's order
("l".to_string(), "mostroP2P".to_string()),
];

tags
Expand Down

0 comments on commit 9da08c1

Please sign in to comment.