mirror of
https://github.com/darkrenaissance/darkfi.git
synced 2026-04-28 03:00:18 -04:00
WIP clean and refactoring according to issue #35
This commit is contained in:
@@ -10,17 +10,6 @@ use serde::{de::DeserializeOwned, Deserialize, Serialize};
|
||||
|
||||
use crate::{Error, Result};
|
||||
|
||||
pub fn load_keypair_to_str(path: PathBuf) -> Result<String> {
|
||||
if Path::new(&path).exists() {
|
||||
let key = fs::read(&path)?;
|
||||
let str_buff = str::from_utf8(&key)?;
|
||||
Ok(str_buff.to_string())
|
||||
} else {
|
||||
println!("Could not parse keypair path");
|
||||
Err(Error::KeypairPathNotFound)
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Clone, Default)]
|
||||
pub struct Config<T> {
|
||||
config: PhantomData<T>,
|
||||
|
||||
@@ -2,4 +2,5 @@ pub mod cli_config;
|
||||
pub mod cli_parser;
|
||||
|
||||
pub use cli_config::{CashierdConfig, Config, DarkfidConfig, DrkConfig, GatewaydConfig};
|
||||
|
||||
pub use cli_parser::{CliCashierd, CliDarkfid, CliDrk, CliDrkSubCommands, CliGatewayd};
|
||||
|
||||
Reference in New Issue
Block a user