Skip to content

Commit

Permalink
Fix getValidity proof (#254)
Browse files Browse the repository at this point in the history
  • Loading branch information
pmantica11 authored Dec 12, 2024
1 parent fcc0ef4 commit 6f1d754
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/api/method/get_validity_proof.rs
Original file line number Diff line number Diff line change
Expand Up @@ -273,12 +273,12 @@ pub async fn get_validity_proof(
&& request.newAddresses.is_empty()
&& request.newAddressesWithTrees.is_empty()
{
return Err(PhotonApiError::UnexpectedError(
return Err(PhotonApiError::ValidationError(
"No hashes or new addresses provided for proof generation".to_string(),
));
}
if !request.newAddressesWithTrees.is_empty() && !request.newAddresses.is_empty() {
return Err(PhotonApiError::UnexpectedError(
return Err(PhotonApiError::ValidationError(
"Cannot provide both newAddresses and newAddressesWithTree".to_string(),
));
}
Expand Down

0 comments on commit 6f1d754

Please sign in to comment.