From 9d500810d3f95a8dec7d57a91d4b3dd67b781a02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Francisco=20Calder=C3=B3n?= Date: Wed, 20 Dec 2023 17:51:23 -0300 Subject: [PATCH] Change table tag to z (#171) * Update mostro core version * Data table related to the event is in a z tag --- Cargo.toml | 2 +- src/app/admin_take_dispute.rs | 3 ++- src/app/dispute.rs | 3 ++- src/nip33.rs | 4 ++-- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index e4e7d3bf..3e980520 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -36,7 +36,7 @@ uuid = { version = "1.3.0", features = [ "serde", ] } reqwest = { version = "0.11", features = ["json"] } -mostro-core = "0.4.4" +mostro-core = "0.4.5" tracing = "0.1.37" tracing-subscriber = { version = "0.3.16", features = ["env-filter"] } config = "0.13.3" diff --git a/src/app/admin_take_dispute.rs b/src/app/admin_take_dispute.rs index 41f71497..4ed9a90a 100644 --- a/src/app/admin_take_dispute.rs +++ b/src/app/admin_take_dispute.rs @@ -72,7 +72,8 @@ pub async fn admin_take_dispute_action( // We create a tag to show status of the dispute let tags = vec![ ("s".to_string(), "InProgress".to_string()), - ("data_label".to_string(), "dispute".to_string()), + ("y".to_string(), "mostrop2p".to_string()), + ("z".to_string(), "dispute".to_string()), ]; // nip33 kind with dispute id as identifier let event = new_event(my_keys, "", dispute_id.to_string(), tags)?; diff --git a/src/app/dispute.rs b/src/app/dispute.rs index 975e8f3f..2d4b2736 100644 --- a/src/app/dispute.rs +++ b/src/app/dispute.rs @@ -103,7 +103,8 @@ pub async fn dispute_action( // We create a tag to show status of the dispute let tags = vec![ ("s".to_string(), dispute.status.to_string()), - ("data_label".to_string(), "dispute".to_string()), + ("y".to_string(), "mostrop2p".to_string()), + ("z".to_string(), "dispute".to_string()), ]; // nip33 kind with dispute id as identifier let event = new_event(my_keys, "", dispute.id.to_string(), tags)?; diff --git a/src/nip33.rs b/src/nip33.rs index bc7acb6a..c06eeedf 100644 --- a/src/nip33.rs +++ b/src/nip33.rs @@ -55,9 +55,9 @@ pub fn order_to_tags(order: &Order) -> Vec<(String, 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()), + ("y".to_string(), "mostrop2p".to_string()), // Table name - ("data_label".to_string(), "order".to_string()), + ("z".to_string(), "order".to_string()), ]; tags