From 43ab8bbb28b0e2123e8897bbac2d83a2b5e8f1fd Mon Sep 17 00:00:00 2001 From: creating2morrow Date: Thu, 2 Nov 2023 02:42:10 -0400 Subject: [PATCH] patch wallet already open error --- neveko-core/src/order.rs | 3 ++- neveko-gui/src/apps/market.rs | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/neveko-core/src/order.rs b/neveko-core/src/order.rs index fe2f951..2d44595 100644 --- a/neveko-core/src/order.rs +++ b/neveko-core/src/order.rs @@ -69,6 +69,7 @@ pub async fn create(j_order: Json) -> Order { return Default::default(); } // enable multisig + monero::close_wallet(&orid, &wallet_password).await; monero::enable_experimental_multisig(&orid); debug!("insert order: {:?}", &new_order); let s = db::Interface::open(); @@ -83,7 +84,6 @@ pub async fn create(j_order: Json) -> Order { let order_list = [r, String::from(&orid)].join(","); debug!("writing order index {} for id: {}", order_list, list_key); db::Interface::write(&s.env, &s.handle, &String::from(list_key), &order_list); - monero::close_wallet(&orid, &wallet_password).await; new_order } @@ -376,5 +376,6 @@ pub async fn init_mediator_wallet(orid: &String) { log::error!("failed to create mediator wallet"); } // enable multisig + monero::close_wallet(&orid, &password).await; monero::enable_experimental_multisig(&orid); } diff --git a/neveko-gui/src/apps/market.rs b/neveko-gui/src/apps/market.rs index fc85897..73da787 100644 --- a/neveko-gui/src/apps/market.rs +++ b/neveko-gui/src/apps/market.rs @@ -1419,9 +1419,10 @@ fn send_prepare_info_req( return; } // enable multisig - monero::enable_experimental_multisig(&w_orid); - let prepare_info = monero::prepare_wallet().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; utils::write_gui_db( String::from(crate::GUI_MSIG_PREPARE_DB_KEY),