[Fix] Split

This commit is contained in:
Alex Emmet 2026-05-04 17:04:58 +02:00
commit e5360088eb
21 changed files with 197 additions and 18 deletions

View file

@ -0,0 +1,18 @@
use json::JsonValue;
use iota_iota_util::file_util::load_file;
// NOT USED AT MOMENT
pub fn is_private_key_valid(user_id: &i64, key_hash: &str) -> bool {
let file_contents = load_file("", "users.json");
let users = json::parse(&file_contents).unwrap();
if let JsonValue::Array(users_array) = users {
for user in users_array {
if user["uuid"] == user_id.to_string() && user["private_key_hash"] == key_hash {
return true;
}
}
}
false
}