mirror of
https://github.com/creating2morrow/neveko.git
synced 2025-01-03 09:29:39 +00:00
merge branch dev
This commit is contained in:
commit
119896ec3e
4 changed files with 21 additions and 13 deletions
|
@ -36,7 +36,7 @@ pub const RX_MESSAGE_DB_KEY: &str = "rx";
|
|||
pub const DISPUTE_LAST_CHECK_DB_KEY: &str = "dlc";
|
||||
pub const FTS_DB_KEY: &str = "fts";
|
||||
pub const CUSTOMER_ORDER_LIST_DB_KEY: &str = "olc";
|
||||
pub const MEDIATOR_DB_KEY: &str = "med8";
|
||||
pub const ADJUDICATOR_DB_KEY: &str = "med8";
|
||||
pub const MSIG_MESSAGE_DB_KEY: &str = "msig";
|
||||
pub const MSIG_MESSAGE_LIST_DB_KEY: &str = "msigl";
|
||||
pub const FTS_JWP_DB_KEY: &str = "fts-jwp";
|
||||
|
|
|
@ -76,7 +76,7 @@ pub async fn create(j_order: Json<reqres::OrderRequest>) -> Order {
|
|||
debug!("insert order: {:?}", &new_order);
|
||||
let s = db::Interface::async_open().await;
|
||||
// inject adjudicator separately, modifying the order model is mendokusai
|
||||
let adjudicator_k = format!("{}-{}", crate::MEDIATOR_DB_KEY, &orid);
|
||||
let adjudicator_k = format!("{}-{}", crate::ADJUDICATOR_DB_KEY, &orid);
|
||||
db::Interface::async_write(&s.env, &s.handle, &adjudicator_k, &j_order.adjudicator).await;
|
||||
let k = &new_order.orid;
|
||||
db::Interface::async_write(&s.env, &s.handle, k, &Order::to_db(&new_order)).await;
|
||||
|
|
|
@ -438,7 +438,7 @@ impl eframe::App for MarketApp {
|
|||
}
|
||||
ui.horizontal(|ui| {
|
||||
let adjudicator = ui.label("Mediator: ");
|
||||
let prefix = String::from(crate::GUI_MSIG_MEDIATOR_DB_KEY);
|
||||
let prefix = String::from(crate::GUI_MSIG_ADJUDICATOR_DB_KEY);
|
||||
if !self.msig.query_adjudicator {
|
||||
let adjudicator_db =
|
||||
utils::search_gui_db(String::from(&prefix), self.m_order.orid.clone());
|
||||
|
@ -477,7 +477,8 @@ impl eframe::App for MarketApp {
|
|||
ui.label("Prepare: \t\t\t\t\t");
|
||||
if ui.button("Prepare").clicked() {
|
||||
self.is_loading = true;
|
||||
let adjudicator_prefix = String::from(crate::GUI_MSIG_MEDIATOR_DB_KEY);
|
||||
let adjudicator_prefix =
|
||||
String::from(crate::GUI_MSIG_ADJUDICATOR_DB_KEY);
|
||||
let vendor_prefix = String::from(crate::GUI_OVL_DB_KEY);
|
||||
let adjudicator =
|
||||
utils::search_gui_db(adjudicator_prefix, self.m_order.orid.clone());
|
||||
|
@ -494,7 +495,8 @@ impl eframe::App for MarketApp {
|
|||
)
|
||||
}
|
||||
if ui.button("Check").clicked() {
|
||||
let adjudicator_prefix = String::from(crate::GUI_MSIG_MEDIATOR_DB_KEY);
|
||||
let adjudicator_prefix =
|
||||
String::from(crate::GUI_MSIG_ADJUDICATOR_DB_KEY);
|
||||
let vendor_prefix = String::from(crate::GUI_OVL_DB_KEY);
|
||||
let adjudicator =
|
||||
utils::search_gui_db(adjudicator_prefix, self.m_order.orid.clone());
|
||||
|
@ -516,7 +518,8 @@ impl eframe::App for MarketApp {
|
|||
ui.label("Make: \t\t\t\t\t\t");
|
||||
if ui.button("Make").clicked() {
|
||||
self.is_loading = true;
|
||||
let adjudicator_prefix = String::from(crate::GUI_MSIG_MEDIATOR_DB_KEY);
|
||||
let adjudicator_prefix =
|
||||
String::from(crate::GUI_MSIG_ADJUDICATOR_DB_KEY);
|
||||
let vendor_prefix = String::from(crate::GUI_OVL_DB_KEY);
|
||||
let adjudicator =
|
||||
utils::search_gui_db(adjudicator_prefix, self.m_order.orid.clone());
|
||||
|
@ -533,7 +536,8 @@ impl eframe::App for MarketApp {
|
|||
)
|
||||
}
|
||||
if ui.button("Check").clicked() {
|
||||
let adjudicator_prefix = String::from(crate::GUI_MSIG_MEDIATOR_DB_KEY);
|
||||
let adjudicator_prefix =
|
||||
String::from(crate::GUI_MSIG_ADJUDICATOR_DB_KEY);
|
||||
let vendor_prefix = String::from(crate::GUI_OVL_DB_KEY);
|
||||
let adjudicator =
|
||||
utils::search_gui_db(adjudicator_prefix, self.m_order.orid.clone());
|
||||
|
@ -555,7 +559,8 @@ impl eframe::App for MarketApp {
|
|||
ui.label("Key Exchange Initial: \t\t\t");
|
||||
if ui.button("KEX-INIT").clicked() {
|
||||
self.is_loading = true;
|
||||
let adjudicator_prefix = String::from(crate::GUI_MSIG_MEDIATOR_DB_KEY);
|
||||
let adjudicator_prefix =
|
||||
String::from(crate::GUI_MSIG_ADJUDICATOR_DB_KEY);
|
||||
let vendor_prefix = String::from(crate::GUI_OVL_DB_KEY);
|
||||
let adjudicator =
|
||||
utils::search_gui_db(adjudicator_prefix, self.m_order.orid.clone());
|
||||
|
@ -572,7 +577,8 @@ impl eframe::App for MarketApp {
|
|||
)
|
||||
}
|
||||
if ui.button("Check").clicked() {
|
||||
let adjudicator_prefix = String::from(crate::GUI_MSIG_MEDIATOR_DB_KEY);
|
||||
let adjudicator_prefix =
|
||||
String::from(crate::GUI_MSIG_ADJUDICATOR_DB_KEY);
|
||||
let vendor_prefix = String::from(crate::GUI_OVL_DB_KEY);
|
||||
let adjudicator =
|
||||
utils::search_gui_db(adjudicator_prefix, self.m_order.orid.clone());
|
||||
|
@ -594,7 +600,8 @@ impl eframe::App for MarketApp {
|
|||
ui.label("Key Exchange Final: \t\t\t");
|
||||
if ui.button("KEX-FINAL").clicked() {
|
||||
self.is_loading = true;
|
||||
let adjudicator_prefix = String::from(crate::GUI_MSIG_MEDIATOR_DB_KEY);
|
||||
let adjudicator_prefix =
|
||||
String::from(crate::GUI_MSIG_ADJUDICATOR_DB_KEY);
|
||||
let vendor_prefix = String::from(crate::GUI_OVL_DB_KEY);
|
||||
let adjudicator =
|
||||
utils::search_gui_db(adjudicator_prefix, self.m_order.orid.clone());
|
||||
|
@ -611,7 +618,8 @@ impl eframe::App for MarketApp {
|
|||
)
|
||||
}
|
||||
if ui.button("Check").clicked() {
|
||||
let adjudicator_prefix = String::from(crate::GUI_MSIG_MEDIATOR_DB_KEY);
|
||||
let adjudicator_prefix =
|
||||
String::from(crate::GUI_MSIG_ADJUDICATOR_DB_KEY);
|
||||
let vendor_prefix = String::from(crate::GUI_OVL_DB_KEY);
|
||||
let adjudicator =
|
||||
utils::search_gui_db(adjudicator_prefix, self.m_order.orid.clone());
|
||||
|
@ -952,7 +960,7 @@ impl eframe::App for MarketApp {
|
|||
ui.add(egui::Spinner::new());
|
||||
ui.label("loading...");
|
||||
}
|
||||
let adjudicator_prefix = String::from(crate::GUI_MSIG_MEDIATOR_DB_KEY);
|
||||
let adjudicator_prefix = String::from(crate::GUI_MSIG_ADJUDICATOR_DB_KEY);
|
||||
let adjudicator =
|
||||
utils::search_gui_db(adjudicator_prefix, self.m_order.orid.clone());
|
||||
ui.label(format!("customer id: {}", self.new_order.cid));
|
||||
|
|
|
@ -22,7 +22,7 @@ pub const GUI_MSIG_KEX_TWO_DB_KEY: &str = "gui-kex-2";
|
|||
pub const GUI_MSIG_EXPORT_DB_KEY: &str = "gui-export";
|
||||
pub const GUI_MSIG_IMPORT_DB_KEY: &str = "gui-import";
|
||||
pub const GUI_MSIG_MAKE_DB_KEY: &str = "gui-make";
|
||||
pub const GUI_MSIG_MEDIATOR_DB_KEY: &str = "gui-adjudicator";
|
||||
pub const GUI_MSIG_ADJUDICATOR_DB_KEY: &str = "gui-adjudicator";
|
||||
pub const GUI_MSIG_PREPARE_DB_KEY: &str = "gui-prepare";
|
||||
pub const GUI_MSIG_TXSET_DB_KEY: &str = "gui-txset";
|
||||
// End LMDB keys
|
||||
|
|
Loading…
Reference in a new issue