mirror of
https://github.com/creating2morrow/neveko.git
synced 2024-12-22 11:39:22 +00:00
enable experimental multisig on wallet creation
This commit is contained in:
parent
30f181946f
commit
a94718ed75
6 changed files with 26 additions and 2 deletions
|
@ -1383,3 +1383,20 @@ pub async fn p_get_transactions(
|
|||
Err(_) => Ok(Default::default()),
|
||||
}
|
||||
}
|
||||
|
||||
/// enable multisig - `monero-wallet-cli --password <> --wallet-file <> set enable-multisig-experimental 1`
|
||||
pub fn enable_experimental_multisig(wallet_file: &String) {
|
||||
let bin_dir = get_monero_location();
|
||||
let wallet_password =
|
||||
std::env::var(crate::MONERO_WALLET_PASSWORD).unwrap_or(String::from("password"));
|
||||
let args = vec![
|
||||
"--password", &wallet_password,
|
||||
"--wallet-file", &wallet_file,
|
||||
"set", "enable-mulitsig-experimental", "1"
|
||||
];
|
||||
let output = Command::new(format!("{}/monero-wallet-cli", bin_dir))
|
||||
.args(args)
|
||||
.spawn()
|
||||
.expect("failed to enable experimental msig");
|
||||
debug!("{:?}", output.stdout);
|
||||
}
|
||||
|
|
|
@ -68,6 +68,8 @@ pub async fn create(j_order: Json<reqres::OrderRequest>) -> Order {
|
|||
monero::close_wallet(&orid, &wallet_password).await;
|
||||
return Default::default();
|
||||
}
|
||||
// enable multisig
|
||||
monero::enable_experimental_multisig(&orid);
|
||||
debug!("insert order: {:?}", &new_order);
|
||||
let s = db::Interface::open();
|
||||
let k = &new_order.orid;
|
||||
|
@ -373,4 +375,6 @@ pub async fn init_mediator_wallet(orid: &String) {
|
|||
if !m_wallet {
|
||||
log::error!("failed to create mediator wallet");
|
||||
}
|
||||
// enable multisig
|
||||
monero::enable_experimental_multisig(&orid);
|
||||
}
|
||||
|
|
|
@ -528,6 +528,7 @@ fn start_gui() {
|
|||
/// Put all app pre-checks here
|
||||
pub async fn start_up() {
|
||||
info!("neveko is starting up");
|
||||
warn!("monero multising is experimental and usage of neveko may lead to loss of funds");
|
||||
let args = args::Args::parse();
|
||||
if args.remote_access {
|
||||
start_micro_servers();
|
||||
|
|
|
@ -1418,6 +1418,8 @@ fn send_prepare_info_req(
|
|||
let _ = tx.send(utils::empty_string());
|
||||
return;
|
||||
}
|
||||
// enable multisig
|
||||
monero::enable_experimental_multisig(&w_orid);
|
||||
let prepare_info = monero::prepare_wallet().await;
|
||||
monero::close_wallet(&w_orid, &wallet_password).await;
|
||||
let ref_prepare_info: &String = &prepare_info.result.multisig_info;
|
||||
|
|
Loading…
Reference in a new issue