Skip to content

Commit

Permalink
Remove unused functions
Browse files Browse the repository at this point in the history
Signed-off-by: Patrik Stas <[email protected]>
  • Loading branch information
Patrik-Stas committed Jul 12, 2021
1 parent d51da45 commit bf3ce30
Showing 1 changed file with 0 additions and 24 deletions.
24 changes: 0 additions & 24 deletions libvcx/src/utils/validation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,30 +37,6 @@ pub fn validate_verkey(verkey: &str) -> VcxResult<String> {
}
}

pub fn validate_nonce(nonce: &str) -> VcxResult<String> {
let nonce = BigUint::from_str_radix(nonce, 10)
.map_err(|err| VcxError::from_msg(VcxErrorKind::InvalidNonce, err))?;
if nonce.bits() > 80 {
return Err(VcxError::from_msg(VcxErrorKind::InvalidNonce, "Invalid Nonce length"));
}
Ok(nonce.to_string())
}

pub fn validate_key_delegate(delegate: &str) -> VcxResult<String> {
//todo: find out what needs to be validated for key_delegate
let check_delegate = String::from(delegate);
Ok(check_delegate)
}

pub fn validate_actors(actors: &str) -> VcxResult<Vec<Actors>> {
::serde_json::from_str(&actors)
.map_err(|err| VcxError::from_msg(VcxErrorKind::InvalidOption, format!("Invalid actors: {:?}", err)))
}

pub fn validate_phone_number(p_num: &str) -> VcxResult<String> {
Ok(String::from(p_num))
}

pub fn validate_payment_method(payment_method: &str) -> VcxResult<()> {
if payment_method.is_empty() {
return Err(VcxError::from(VcxErrorKind::MissingPaymentMethod));
Expand Down

0 comments on commit bf3ce30

Please sign in to comment.