mirror of
https://github.com/creating2morrow/neveko.git
synced 2025-01-03 17:39:55 +00:00
patch wallet already open error
This commit is contained in:
parent
27507a659c
commit
43ab8bbb28
2 changed files with 5 additions and 3 deletions
|
@ -69,6 +69,7 @@ pub async fn create(j_order: Json<reqres::OrderRequest>) -> Order {
|
||||||
return Default::default();
|
return Default::default();
|
||||||
}
|
}
|
||||||
// enable multisig
|
// enable multisig
|
||||||
|
monero::close_wallet(&orid, &wallet_password).await;
|
||||||
monero::enable_experimental_multisig(&orid);
|
monero::enable_experimental_multisig(&orid);
|
||||||
debug!("insert order: {:?}", &new_order);
|
debug!("insert order: {:?}", &new_order);
|
||||||
let s = db::Interface::open();
|
let s = db::Interface::open();
|
||||||
|
@ -83,7 +84,6 @@ pub async fn create(j_order: Json<reqres::OrderRequest>) -> Order {
|
||||||
let order_list = [r, String::from(&orid)].join(",");
|
let order_list = [r, String::from(&orid)].join(",");
|
||||||
debug!("writing order index {} for id: {}", order_list, list_key);
|
debug!("writing order index {} for id: {}", order_list, list_key);
|
||||||
db::Interface::write(&s.env, &s.handle, &String::from(list_key), &order_list);
|
db::Interface::write(&s.env, &s.handle, &String::from(list_key), &order_list);
|
||||||
monero::close_wallet(&orid, &wallet_password).await;
|
|
||||||
new_order
|
new_order
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -376,5 +376,6 @@ pub async fn init_mediator_wallet(orid: &String) {
|
||||||
log::error!("failed to create mediator wallet");
|
log::error!("failed to create mediator wallet");
|
||||||
}
|
}
|
||||||
// enable multisig
|
// enable multisig
|
||||||
|
monero::close_wallet(&orid, &password).await;
|
||||||
monero::enable_experimental_multisig(&orid);
|
monero::enable_experimental_multisig(&orid);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1419,9 +1419,10 @@ fn send_prepare_info_req(
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// enable multisig
|
// enable multisig
|
||||||
monero::enable_experimental_multisig(&w_orid);
|
|
||||||
let prepare_info = monero::prepare_wallet().await;
|
|
||||||
monero::close_wallet(&w_orid, &wallet_password).await;
|
monero::close_wallet(&w_orid, &wallet_password).await;
|
||||||
|
monero::enable_experimental_multisig(&w_orid);
|
||||||
|
monero::open_wallet(&w_orid, &wallet_password).await;
|
||||||
|
let prepare_info = monero::prepare_wallet().await;
|
||||||
let ref_prepare_info: &String = &prepare_info.result.multisig_info;
|
let ref_prepare_info: &String = &prepare_info.result.multisig_info;
|
||||||
utils::write_gui_db(
|
utils::write_gui_db(
|
||||||
String::from(crate::GUI_MSIG_PREPARE_DB_KEY),
|
String::from(crate::GUI_MSIG_PREPARE_DB_KEY),
|
||||||
|
|
Loading…
Reference in a new issue