mirror of
https://github.com/creating2morrow/neveko.git
synced 2024-12-31 16:09:27 +00:00
add wallet control to signing for shipping request
This commit is contained in:
parent
0a625fc219
commit
a0d60d2753
1 changed files with 4 additions and 0 deletions
|
@ -464,7 +464,11 @@ pub async fn trigger_ship_request(
|
||||||
) -> Order {
|
) -> Order {
|
||||||
info!("executing trigger_ship_request");
|
info!("executing trigger_ship_request");
|
||||||
let data = String::from(orid);
|
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;
|
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;
|
let order = transmit_sor_request(contact, jwp, orid, &pre_sign.result.signature).await;
|
||||||
// cache order request to db
|
// cache order request to db
|
||||||
if order.is_err() {
|
if order.is_err() {
|
||||||
|
|
Loading…
Reference in a new issue