Skip to content

Commit c32db8f

Browse files
committed
Return the actual error and not false when proof verification fails
1 parent 2faf964 commit c32db8f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src.rs/src/verkle_ffi_api.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -215,11 +215,11 @@ impl Context {
215215
pub fn verify_proof(
216216
&self,
217217
input: Uint8Array,
218-
) -> Result<Boolean, Boolean>
218+
) -> Result<Boolean, JsError>
219219
{
220220
let input_bytes = serde_wasm_bindgen::from_value(input.into()).unwrap();
221221
let result = ffi_interface::verify_proof(&self.inner, input_bytes).map(|_op |Boolean::from(true))
222-
.map_err(|_err| Boolean::from(false));
222+
.map_err(|err| JsError::new(&format!("proof verification failed]: {:?}", err)));
223223
return result
224224
}
225225
}

0 commit comments

Comments
 (0)