patch invalid password on order wallets

This commit is contained in:
creating2morrow 2023-07-30 05:47:27 -04:00
parent 914ca7a136
commit ffa5cfec95
2 changed files with 21 additions and 12 deletions

View file

@ -495,8 +495,10 @@ fn is_fts_clear(r: String) -> bool {
/// `prepare_multisig_info` method.
pub async fn send_prepare_info(orid: &String, contact: &String) {
let s = db::Interface::open();
let wallet_password = utils::empty_string();
monero::open_wallet(&orid, &wallet_password).await;
let wallet_name = String::from(orid);
let wallet_password =
std::env::var(crate::MONERO_WALLET_PASSWORD).unwrap_or(String::from("password"));
monero::open_wallet(&wallet_name, &wallet_password).await;
let prepare_info = monero::prepare_wallet().await;
let k = format!("{}-{}", crate::FTS_JWP_DB_KEY, contact);
let jwp = db::Interface::read(&s.env, &s.handle, &k);
@ -520,8 +522,10 @@ pub async fn send_prepare_info(orid: &String, contact: &String) {
/// `make_multisig_info` method.
pub async fn send_make_info(orid: &String, contact: &String, info: Vec<String>) {
let s = db::Interface::open();
let wallet_password = utils::empty_string();
monero::open_wallet(&orid, &wallet_password).await;
let wallet_name = String::from(orid);
let wallet_password =
std::env::var(crate::MONERO_WALLET_PASSWORD).unwrap_or(String::from("password"));
monero::open_wallet(&wallet_name, &wallet_password).await;
let make_info = monero::make_wallet(info).await;
let k = format!("{}-{}", crate::FTS_JWP_DB_KEY, contact);
let jwp = db::Interface::read(&s.env, &s.handle, &k);
@ -542,8 +546,10 @@ pub async fn send_make_info(orid: &String, contact: &String, info: Vec<String>)
/// `exchange_multisig_keys` method.
pub async fn send_exchange_info(orid: &String, contact: &String, info: Vec<String>) {
let s = db::Interface::open();
let wallet_password = utils::empty_string();
monero::open_wallet(&orid, &wallet_password).await;
let wallet_name = String::from(orid);
let wallet_password =
std::env::var(crate::MONERO_WALLET_PASSWORD).unwrap_or(String::from("password"));
monero::open_wallet(&wallet_name, &wallet_password).await;
let exchange_info = monero::exchange_multisig_keys(false, info, &wallet_password).await;
let k = format!("{}-{}", crate::FTS_JWP_DB_KEY, contact);
let jwp = db::Interface::read(&s.env, &s.handle, &k);
@ -567,8 +573,10 @@ pub async fn send_exchange_info(orid: &String, contact: &String, info: Vec<Strin
/// `export_multisig_info` method.
pub async fn send_export_info(orid: &String, contact: &String) {
let s = db::Interface::open();
let wallet_password = utils::empty_string();
monero::open_wallet(&orid, &wallet_password).await;
let wallet_name = String::from(orid);
let wallet_password =
std::env::var(crate::MONERO_WALLET_PASSWORD).unwrap_or(String::from("password"));
monero::open_wallet(&wallet_name, &wallet_password).await;
let exchange_info = monero::export_multisig_info().await;
let k = format!("{}-{}", crate::FTS_JWP_DB_KEY, contact);
let jwp = db::Interface::read(&s.env, &s.handle, &k);

View file

@ -284,11 +284,12 @@ impl eframe::App for AddressBookApp {
self.is_approving_jwp = false;
}
}
}
// TODO(c2m): add payment timeout error handling to prevent infinite loading window
if ui.button("Exit").clicked() {
self.approve_payment = false;
self.is_loading = false;
}
}
});
// Contact status window