Skip to content

Commit

Permalink
fix default privkey policy in test helper activation request
Browse files Browse the repository at this point in the history
  • Loading branch information
dimxy committed Feb 14, 2024
1 parent 75c75a6 commit b98d380
Showing 1 changed file with 13 additions and 10 deletions.
23 changes: 13 additions & 10 deletions mm2src/mm2_test_helpers/src/for_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2861,23 +2861,26 @@ pub async fn init_utxo_electrum(
path_to_address: Option<HDAccountAddressId>,
priv_key_policy: Option<&str>,
) -> Json {
let mut activation_params = json!({
"mode": {
"rpc": "Electrum",
"rpc_data": {
"servers": servers,
"path_to_address": path_to_address
}
}
});
if let Some(priv_key_policy) = priv_key_policy {
activation_params["priv_key_policy"] = priv_key_policy.into();
}
let request = mm
.rpc(&json!({
"userpass": mm.userpass,
"method": "task::enable_utxo::init",
"mmrpc": "2.0",
"params": {
"ticker": coin,
"activation_params": {
"mode": {
"rpc": "Electrum",
"rpc_data": {
"servers": servers,
"path_to_address": path_to_address
}
},
"priv_key_policy": priv_key_policy
}
"activation_params": activation_params
}
}))
.await
Expand Down

0 comments on commit b98d380

Please sign in to comment.