mirror of
https://github.com/creating2morrow/neveko.git
synced 2024-12-22 11:39:22 +00:00
start msig parsing debug
This commit is contained in:
parent
87847ad01d
commit
55d35d4206
5 changed files with 53 additions and 91 deletions
|
@ -108,13 +108,6 @@ most of the complex logic stays in neveko-core, exported from [lib.rs](./neveko-
|
|||
|
||||
[the manual](./docs/man.md)
|
||||
|
||||
## Library
|
||||
|
||||
* hosting various hacking, networking, IT etc. related resources
|
||||
* http://c2m66oddrzozztxyzjegbdwtgbeiibq5vz2tpchmqamrzcahcfoq.b32.i2p/library/Books
|
||||
* have a request for a new book? send a message to nevekonet I2P inspIRC #random
|
||||
* see `light-reading` for curated (< 1mb) in-browser reading over i2p
|
||||
|
||||
## Donations
|
||||
|
||||
This is just a hobby project but if anything here is useful donations are much appreciated!
|
||||
|
|
|
@ -1,19 +0,0 @@
|
|||
-----BEGIN PGP SIGNED MESSAGE-----
|
||||
Hash: SHA512
|
||||
|
||||
|
||||
I am the admin of http://c2m66oddrzozztxyzjegbdwtgbeiibq5vz2tpchmqamrzcahcfoq.b32.i2p.
|
||||
I am in control of my PGP key.
|
||||
I will update this canary within 14 days.
|
||||
Today is Mon Jul 10 05:16:42 PM UTC 2023.
|
||||
|
||||
Latest monero block hash (2926791):
|
||||
20932190c77951183c0b085bdfc64e4bdc7150e7d625b0c6ec46c06c9ef226e8
|
||||
-----BEGIN PGP SIGNATURE-----
|
||||
|
||||
iJIEARYKADoWIQQEoRcoLQbE3ctKJgFaPK5QG49jTAUCZKw8+hwcY3JlYXRpbmdf
|
||||
dG9tb3Jyb3dAcHJvdG9uLm1lAAoJEFo8rlAbj2NMeZkA/j8ifcKtkeHE7mFu3k54
|
||||
ltxRec2FFhpT/M6X7ClXzsn6AP9Y2VBYK7ChQ34NCrskAxWP9uC/mwv481Oy0d4C
|
||||
RyNWAw==
|
||||
=g/0B
|
||||
-----END PGP SIGNATURE-----
|
|
@ -1,41 +0,0 @@
|
|||
-----BEGIN PGP SIGNED MESSAGE-----
|
||||
Hash: SHA512
|
||||
|
||||
NEVEKO Links (Dark)
|
||||
|
||||
# Git Clone
|
||||
torsocks git clone git://nvl5yxqvhufllbsvfevqsytxdbi7aqonp7qceu4ljomfyardzjd7l4yd.onion/neveko
|
||||
|
||||
# Git Web
|
||||
http://c2m373qgif2qigrntgjaqevfcnqjkqb2zcy3bop6vqwbudqqr7oa.b32.i2p
|
||||
|
||||
# Nevekonet InspIRC
|
||||
c2m5qj2ceahpbzusggcoybjm2kqakrd5v7zv2pvi2qxozqmgjpua.b32.i2p/6667
|
||||
- #dev (patches, feature planning)
|
||||
- #issues (bug report, testing results)
|
||||
- #random
|
||||
|
||||
# Home, index, canary, pgp, etc.
|
||||
http://c2m66oddrzozztxyzjegbdwtgbeiibq5vz2tpchmqamrzcahcfoq.b32.i2p
|
||||
- /pgp.txt - public gpg signing key
|
||||
- /index.txt - this page
|
||||
- /canary.txt
|
||||
- /download/neveko-x86_64-linux-gnu-v0.4.8-alpha.tar.bz2 - latest neveko download
|
||||
- /download/neveko-x86_64-linux-gnu-v0.4.8-alpha.tar.bz2.sig - detached sig
|
||||
- /library - knowledge is power
|
||||
|
||||
# Monero remote node (stagenet)
|
||||
http://xmr3kaacphwkk4z2gp35bdl47lrrnzimmyqj4oliauqrjzqecofa.b32.i2p
|
||||
|
||||
NEVEKO Links (Clear)
|
||||
|
||||
# Github
|
||||
git clone https://github.com/creating2morrow/neveko.git
|
||||
-----BEGIN PGP SIGNATURE-----
|
||||
|
||||
iJIEARYKADoWIQQEoRcoLQbE3ctKJgFaPK5QG49jTAUCZK3bORwcY3JlYXRpbmdf
|
||||
dG9tb3Jyb3dAcHJvdG9uLm1lAAoJEFo8rlAbj2NMc8EA/2VekgaXzCQ7nyTs1Ysl
|
||||
7zDhyVUf2LcnDYub/l7Uj5DoAQDgk9pmuR/n4NXdFTMMBpvQFhaxGq5tpQFgL5ma
|
||||
cw6KDw==
|
||||
=VxhW
|
||||
-----END PGP SIGNATURE-----
|
|
@ -125,6 +125,7 @@ pub async fn rx(m: Json<Message>) {
|
|||
|
||||
/// Parse the multisig message type and info
|
||||
fn parse_multisig_message(mid: String) -> MultisigMessageData {
|
||||
// TODO(c2m): manual parsing and db testing
|
||||
let d: reqres::DecryptedMessageBody = decrypt_body(mid);
|
||||
let mut bytes = hex::decode(d.body.into_bytes()).unwrap_or(Vec::new());
|
||||
let decoded = String::from_utf8(bytes).unwrap_or(utils::empty_string());
|
||||
|
|
|
@ -5,6 +5,7 @@ use std::sync::mpsc::{
|
|||
};
|
||||
|
||||
pub struct MultisigManagement {
|
||||
pub completed_prepare: bool,
|
||||
pub exchange_multisig_keys: String,
|
||||
pub export_info: String,
|
||||
pub has_mediator: bool,
|
||||
|
@ -19,6 +20,7 @@ pub struct MultisigManagement {
|
|||
impl Default for MultisigManagement {
|
||||
fn default() -> Self {
|
||||
MultisigManagement {
|
||||
completed_prepare: false,
|
||||
exchange_multisig_keys: utils::empty_string(),
|
||||
export_info: utils::empty_string(),
|
||||
has_mediator: false,
|
||||
|
@ -353,31 +355,40 @@ impl eframe::App for MarketApp {
|
|||
vendor,
|
||||
)
|
||||
}
|
||||
if ui.button("Check").clicked() {
|
||||
let mediator_prefix = String::from(crate::GUI_MSIG_MEDIATOR_DB_KEY);
|
||||
let vendor_prefix = String::from(crate::GUI_OVL_DB_KEY);
|
||||
let mediator =
|
||||
utils::search_gui_db(mediator_prefix, self.m_order.orid.clone());
|
||||
let vendor = utils::search_gui_db(vendor_prefix, self.m_order.orid.clone());
|
||||
let is_prepared = prepared_msg(&mediator, &self.m_order.orid, &vendor);
|
||||
self.msig.completed_prepare = is_prepared;
|
||||
}
|
||||
});
|
||||
ui.horizontal(|ui| {
|
||||
ui.label("Make: \t\t\t\t\t\t");
|
||||
if ui.button("Make").clicked() {}
|
||||
});
|
||||
ui.horizontal(|ui| {
|
||||
ui.label("Exchange Keys: \t\t");
|
||||
if ui.button("Exchange").clicked() {}
|
||||
});
|
||||
ui.horizontal(|ui| {
|
||||
ui.label("Fund:\t\t\t\t\t\t\t");
|
||||
if ui.button("Fund").clicked() {}
|
||||
});
|
||||
ui.horizontal(|ui| {
|
||||
ui.label("Export Info: \t\t\t\t");
|
||||
if ui.button("Export").clicked() {}
|
||||
});
|
||||
ui.horizontal(|ui| {
|
||||
ui.label("Release Payment: \t");
|
||||
if ui.button("Sign Txset").clicked() {}
|
||||
});
|
||||
ui.horizontal(|ui| {
|
||||
ui.label("Create Dispute: \t\t");
|
||||
if ui.button("Dispute").clicked() {}
|
||||
});
|
||||
// ui.horizontal(|ui| {
|
||||
// ui.label("Make: \t\t\t\t\t\t");
|
||||
// if ui.button("Make").clicked() {}
|
||||
// });
|
||||
// ui.horizontal(|ui| {
|
||||
// ui.label("Exchange Keys: \t\t");
|
||||
// if ui.button("Exchange").clicked() {}
|
||||
// });
|
||||
// ui.horizontal(|ui| {
|
||||
// ui.label("Fund:\t\t\t\t\t\t\t");
|
||||
// if ui.button("Fund").clicked() {}
|
||||
// });
|
||||
// ui.horizontal(|ui| {
|
||||
// ui.label("Export Info: \t\t\t\t");
|
||||
// if ui.button("Export").clicked() {}
|
||||
// });
|
||||
// ui.horizontal(|ui| {
|
||||
// ui.label("Release Payment: \t");
|
||||
// if ui.button("Sign Txset").clicked() {}
|
||||
// });
|
||||
// ui.horizontal(|ui| {
|
||||
// ui.label("Create Dispute: \t\t");
|
||||
// if ui.button("Dispute").clicked() {}
|
||||
// });
|
||||
ui.label("\n");
|
||||
if ui.button("Exit").clicked() {
|
||||
self.is_managing_multisig = false;
|
||||
|
@ -1156,6 +1167,7 @@ impl eframe::App for MarketApp {
|
|||
}
|
||||
}
|
||||
|
||||
// Async fn requests
|
||||
fn _refresh_on_delete_product_req(_tx: Sender<bool>, _ctx: egui::Context) {
|
||||
tokio::spawn(async move {
|
||||
tokio::time::sleep(std::time::Duration::from_secs(1)).await;
|
||||
|
@ -1298,6 +1310,8 @@ fn send_prepare_info_req(
|
|||
);
|
||||
// Request mediator and vendor while we're at it
|
||||
// Will coordinating send this on make requests next
|
||||
|
||||
// TODO(c2m): check for partial completion to avoid duplicate requests
|
||||
log::debug!("constructing {} msig messages", message::PREPARE_MSIG);
|
||||
let v_msig_request: reqres::MultisigInfoRequest = reqres::MultisigInfoRequest {
|
||||
contact: i2p::get_destination(None),
|
||||
|
@ -1319,3 +1333,17 @@ fn send_prepare_info_req(
|
|||
});
|
||||
ctx.request_repaint();
|
||||
}
|
||||
|
||||
// End Async fn requests
|
||||
|
||||
fn prepared_msg(mediator: &String, orid: &String, vendor: &String,) -> bool {
|
||||
let s = db::Interface::open();
|
||||
let m_msig_key = format!("{}-{}-{}", message::PREPARE_MSIG, orid, mediator);
|
||||
let v_msig_key = format!("{}-{}-{}", message::PREPARE_MSIG, orid, vendor);
|
||||
let m_prepare = db::Interface::read(&s.env, &s.handle, &m_msig_key);
|
||||
let v_prepare = db::Interface::read(&s.env, &s.handle, &v_msig_key);
|
||||
log::debug!("mediator prepare info: {}", &m_prepare);
|
||||
log::debug!("vendor prepare info: {}", &v_prepare);
|
||||
m_prepare != utils::empty_string() && v_prepare != utils::empty_string()
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue