From 257044b21001b57cc7a883dace246891951c6f0f Mon Sep 17 00:00:00 2001 From: Rostyslav Tyshko Date: Fri, 18 Apr 2025 11:45:01 -0400 Subject: [PATCH] fmt --- accounts/src/key_management/constants_types.rs | 14 +++++++++++--- node_rpc/src/process.rs | 6 ++---- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/accounts/src/key_management/constants_types.rs b/accounts/src/key_management/constants_types.rs index cc435be..f4fca86 100644 --- a/accounts/src/key_management/constants_types.rs +++ b/accounts/src/key_management/constants_types.rs @@ -2,12 +2,20 @@ use elliptic_curve::{ consts::{B0, B1}, generic_array::GenericArray, }; -use sha2::digest::typenum::{UInt, UTerm}; use lazy_static::lazy_static; +use sha2::digest::typenum::{UInt, UTerm}; lazy_static! { - pub static ref NULLIFIER_SECRET_CONST: [u8; 32] = hex::decode(std::env::var("NULLIFIER_SECRET_CONST").unwrap()).unwrap().try_into().unwrap(); - pub static ref VIEWING_SECRET_CONST: [u8; 32] = hex::decode(std::env::var("VIEWING_SECRET_CONST").unwrap()).unwrap().try_into().unwrap(); + pub static ref NULLIFIER_SECRET_CONST: [u8; 32] = + hex::decode(std::env::var("NULLIFIER_SECRET_CONST").unwrap()) + .unwrap() + .try_into() + .unwrap(); + pub static ref VIEWING_SECRET_CONST: [u8; 32] = + hex::decode(std::env::var("VIEWING_SECRET_CONST").unwrap()) + .unwrap() + .try_into() + .unwrap(); } pub type CipherText = Vec; diff --git a/node_rpc/src/process.rs b/node_rpc/src/process.rs index d3c72cf..25cd9ec 100644 --- a/node_rpc/src/process.rs +++ b/node_rpc/src/process.rs @@ -50,7 +50,7 @@ pub const WRITE_SEND_UTXO_SHIELDED: &str = "write_send_utxo_shielded"; pub const WRITE_SEND_UTXO_DESHIELDED: &str = "write_send_utxo_deshielded"; pub const WRITE_SPLIT_UTXO: &str = "write_split_utxo"; -pub const SUCCESS: &str = "success"; +pub const SUCCESS: &str = "success"; pub const ACCOUNT_NOT_FOUND: &str = "Account not found"; pub const TRANSACTION_NOT_FOUND: &str = "Transaction not found"; @@ -791,9 +791,7 @@ impl JsonHandler { self.process_request_execute_scenario_multiple_send(request) .await } - SHOW_ACCOUNT_PUBLIC_BALANCE => { - self.process_show_account_public_balance(request).await - } + SHOW_ACCOUNT_PUBLIC_BALANCE => self.process_show_account_public_balance(request).await, SHOW_ACCOUNT_UTXO => self.process_show_account_utxo_request(request).await, SHOW_TRANSACTION => self.process_show_transaction(request).await, WRITE_DEPOSIT_PUBLIC_BALANCE => {