From a0d60d2753622eb6625a06c222f92d73cd949c81 Mon Sep 17 00:00:00 2001 From: creating2morrow Date: Sat, 2 Dec 2023 05:08:30 -0500 Subject: [PATCH] add wallet control to signing for shipping request --- neveko-core/src/order.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/neveko-core/src/order.rs b/neveko-core/src/order.rs index 634ad69..decd83a 100644 --- a/neveko-core/src/order.rs +++ b/neveko-core/src/order.rs @@ -464,7 +464,11 @@ pub async fn trigger_ship_request( ) -> Order { info!("executing trigger_ship_request"); let data = String::from(orid); + let wallet_password = + std::env::var(crate::MONERO_WALLET_PASSWORD).unwrap_or(String::from("password")); + monero::open_wallet(&String::from(crate::APP_NAME), &wallet_password).await; let pre_sign = monero::sign(data).await; + monero::close_wallet(&String::from(crate::APP_NAME), &wallet_password).await; let order = transmit_sor_request(contact, jwp, orid, &pre_sign.result.signature).await; // cache order request to db if order.is_err() {