diff --git a/README.md b/README.md index ef42273..8d83758 100644 --- a/README.md +++ b/README.md @@ -34,6 +34,12 @@ NEVidebla-EKOnomia (invisible economy) * ` ./scripts/build_all_and_run.sh "-- --monero-blockchain-dir=/home/user/.bitmonero --monero-location /home/user/monero-x86_64-linux-gnu-v0.18.2.2 --i2p-zero-dir /home/user/i2p-zero-linux.v1.21/ --monero-blockchain-dir /home/user/.bitmonero"` * monerod doesn't need to be running because neveko will start it and monero-wallet-rpc * gui will automatically detect monerod, rpc and i2p-zero if neveko core is started first +* Neveko doesn't write logs to file. Use the command below to write to a log file: + ```bash + {NEVEKO_START_CMDS} > neveko.log 2>&1 + ``` + * just remember to put cli password in the original window, not the log file window + * https://stackoverflow.com/questions/6674327/redirect-all-output-to-file-in-bash * gui built with rust [egui](https://docs.rs/egui/latest/egui/) ## Installation Mananger diff --git a/docs/canary.txt b/docs/canary.txt index c0d1978..43a2fcd 100644 --- a/docs/canary.txt +++ b/docs/canary.txt @@ -5,15 +5,15 @@ 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 Jun 26 02:35:13 AM UTC 2023. +Today is Mon Jul 10 05:16:42 PM UTC 2023. -Latest monero block hash (2916237): -761a51317fc1ae508eab3b0990916f405d7426466485499f9ba851986b558e71 +Latest monero block hash (2926791): +20932190c77951183c0b085bdfc64e4bdc7150e7d625b0c6ec46c06c9ef226e8 -----BEGIN PGP SIGNATURE----- -iJIEARYKADoWIQQEoRcoLQbE3ctKJgFaPK5QG49jTAUCZJj5YRwcY3JlYXRpbmdf -dG9tb3Jyb3dAcHJvdG9uLm1lAAoJEFo8rlAbj2NMHXsBAPWKWEfJoDtUxAPJwjLk -vC4WkUc7kLpEjHihXFkRpR47AP4ptWVnXyt0cpEh1j12/U7QM/rDRUyD2o6Wc3/A -kQsmDA== -=HPZW +iJIEARYKADoWIQQEoRcoLQbE3ctKJgFaPK5QG49jTAUCZKw8+hwcY3JlYXRpbmdf +dG9tb3Jyb3dAcHJvdG9uLm1lAAoJEFo8rlAbj2NMeZkA/j8ifcKtkeHE7mFu3k54 +ltxRec2FFhpT/M6X7ClXzsn6AP9Y2VBYK7ChQ34NCrskAxWP9uC/mwv481Oy0d4C +RyNWAw== +=g/0B -----END PGP SIGNATURE----- diff --git a/neveko-core/src/gpg.rs b/neveko-core/src/gpg.rs index 60a76b6..9352da2 100644 --- a/neveko-core/src/gpg.rs +++ b/neveko-core/src/gpg.rs @@ -18,8 +18,6 @@ use std::{ // TODO(c2m): remove this module and use monero public keys for text encryption /// Searches for key, returns empty string if none exists -/// -/// TODO(c2m): add more cli options pub fn find_key() -> Result> { info!("searching for application gpg key"); let proto = Protocol::OpenPgp; diff --git a/neveko-core/src/monero.rs b/neveko-core/src/monero.rs index 1c72f04..4eb0cd0 100644 --- a/neveko-core/src/monero.rs +++ b/neveko-core/src/monero.rs @@ -488,6 +488,8 @@ fn update_wallet_lock(filename: &String, closing: bool) -> bool { } } +// TODO(c2m): search the app and use this output to either bail (false) or continue (true) + /// Performs the xmr rpc 'open_wallet' method pub async fn open_wallet(filename: &String, password: &String) -> bool { let updated = update_wallet_lock(filename, false); diff --git a/neveko-core/src/proof.rs b/neveko-core/src/proof.rs index 77023ce..b4cdd94 100644 --- a/neveko-core/src/proof.rs +++ b/neveko-core/src/proof.rs @@ -258,6 +258,7 @@ async fn validate_proof(txp: &TxProof) -> TxProof { let tx_type = tx.result.transfer.r#type; let propgated = monero::TransactionType::propagated(tx_type); if !propgated { + monero::close_wallet(&wallet_name, &wallet_password).await; return Default::default(); } let p = monero::check_tx_proof(txp).await; @@ -268,6 +269,7 @@ async fn validate_proof(txp: &TxProof) -> TxProof { && p.result.confirmations < cth && p.result.received >= pth; if lgtm { + monero::close_wallet(&wallet_name, &wallet_password).await; return TxProof { subaddress: String::from(&txp.subaddress), hash: String::from(&txp.hash), diff --git a/neveko-core/src/utils.rs b/neveko-core/src/utils.rs index 416bdaf..71968f4 100644 --- a/neveko-core/src/utils.rs +++ b/neveko-core/src/utils.rs @@ -627,7 +627,7 @@ pub fn stage_cleanup(f: String) { /// /// software on their own. Note that software pull is over /// -/// clearnet. TODO(c2m): trusted download locations over i2p. +/// clearnet. TODO(c2m): trusted download locations over tor. pub async fn install_software(installations: Installations) -> bool { let mut valid_i2p_zero_hash = true; let mut valid_xmr_hash = true; diff --git a/neveko-gui/crates/eframe/src/epi.rs b/neveko-gui/crates/eframe/src/epi.rs index 8372d65..9047b73 100644 --- a/neveko-gui/crates/eframe/src/epi.rs +++ b/neveko-gui/crates/eframe/src/epi.rs @@ -1035,7 +1035,7 @@ pub(crate) mod backend { pub decorated: Option, /// Set to some bool to change window fullscreen. - #[cfg(not(target_arch = "wasm32"))] // TODO(c2m): implement fullscreen on web + #[cfg(not(target_arch = "wasm32"))] pub fullscreen: Option, /// Set to true to drag window while primary mouse button is down. diff --git a/neveko-gui/crates/egui/src/context.rs b/neveko-gui/crates/egui/src/context.rs index 21a79ab..78a447b 100644 --- a/neveko-gui/crates/egui/src/context.rs +++ b/neveko-gui/crates/egui/src/context.rs @@ -1743,7 +1743,6 @@ impl Context { /// The `Context` lock is held while the given closure is called! /// /// Returns `None` if acesskit is off. - // TODO(c2m): consider making both RO and RW versions #[cfg(feature = "accesskit")] pub fn accesskit_node_builder( &self, diff --git a/neveko-gui/crates/egui/src/widgets/plot/items/values.rs b/neveko-gui/crates/egui/src/widgets/plot/items/values.rs index 75d2fe8..880ad56 100644 --- a/neveko-gui/crates/egui/src/widgets/plot/items/values.rs +++ b/neveko-gui/crates/egui/src/widgets/plot/items/values.rs @@ -154,7 +154,7 @@ impl Default for Orientation { pub enum PlotPoints { Owned(Vec), Generator(ExplicitGenerator), - // Borrowed(&[PlotPoint]), // TODO(c2m): Lifetimes are tricky in this case. + // Borrowed(&[PlotPoint]), } impl Default for PlotPoints { diff --git a/neveko-gui/crates/egui/src/widgets/text_edit/builder.rs b/neveko-gui/crates/egui/src/widgets/text_edit/builder.rs index 8846719..e1e2f9f 100644 --- a/neveko-gui/crates/egui/src/widgets/text_edit/builder.rs +++ b/neveko-gui/crates/egui/src/widgets/text_edit/builder.rs @@ -660,7 +660,7 @@ impl<'t> TextEdit<'t> { &cursor_range.primary, ); - let is_fully_visible = ui.clip_rect().contains_rect(rect); // TODO(c2m): remove this HACK workaround for https://github.com/emilk/egui/issues/1531 + let is_fully_visible = ui.clip_rect().contains_rect(rect); if (response.changed || selection_changed) && !is_fully_visible { ui.scroll_to_rect(cursor_pos, None); // keep cursor in view } diff --git a/neveko-gui/crates/epaint/src/text/text_layout.rs b/neveko-gui/crates/epaint/src/text/text_layout.rs index ed9d91d..19f4e56 100644 --- a/neveko-gui/crates/epaint/src/text/text_layout.rs +++ b/neveko-gui/crates/epaint/src/text/text_layout.rs @@ -798,7 +798,6 @@ fn is_kana(c: char) -> bool { #[inline] fn is_cjk(c: char) -> bool { - // TODO(c2m): Add support for Korean Hangul. is_cjk_ideograph(c) || is_kana(c) } diff --git a/neveko-gui/src/apps/address_book.rs b/neveko-gui/src/apps/address_book.rs index 17c5516..ae47f8d 100644 --- a/neveko-gui/src/apps/address_book.rs +++ b/neveko-gui/src/apps/address_book.rs @@ -773,8 +773,6 @@ fn send_payment_req( String::from(&contact), format!("{}", unix), ); - // TODO(c2m): edge case when proving payment fails to complete - // case the payment proof data and set retry logic ctx.request_repaint(); } _ => log::error!("failed to obtain jwp"), diff --git a/neveko-gui/src/apps/settings.rs b/neveko-gui/src/apps/settings.rs index 655d3f6..3c59459 100644 --- a/neveko-gui/src/apps/settings.rs +++ b/neveko-gui/src/apps/settings.rs @@ -29,6 +29,7 @@ impl eframe::App for SettingsApp { "____________________________________________________________________________\n", ); ui.horizontal(|ui| { + // TODO(c2m): call monero-wallet-rpc to update as well let sweep_label = ui.label("new credential: \t"); ui.text_edit_singleline(&mut self.credential) .labelled_by(sweep_label.id);