Skip to content

Commit 09ea11a

Browse files
more work
1 parent fb0b182 commit 09ea11a

File tree

7 files changed

+193
-164
lines changed

7 files changed

+193
-164
lines changed

Cargo.lock

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/wasm-drive-verify/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ crate-type = ["cdylib", "rlib"]
1212
[dependencies]
1313
drive = { path = "../rs-drive", default-features = false, features = ["verify"] }
1414
dpp = { path = "../rs-dpp", default-features = false, features = ["state-transitions", "system_contracts"] }
15-
platform-value = { path = "../rs-platform-value" }
1615
wasm-dpp = { path = "../wasm-dpp" }
1716

1817
wasm-bindgen = { version = "0.2.89" }

packages/wasm-drive-verify/single_document.d.ts

Lines changed: 0 additions & 149 deletions
This file was deleted.

packages/wasm-drive-verify/src/document/verify_proof.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,9 @@ pub fn verify_document_proof(
5252
// For now, we need the contract to be provided as CBOR bytes through contract_js
5353
// This is a limitation until we have proper JS serialization for DataContract
5454
let contract_bytes: Vec<u8> = if contract_js.is_instance_of::<Uint8Array>() {
55-
let array: Uint8Array = contract_js.clone().dyn_into()
55+
let array: Uint8Array = contract_js
56+
.clone()
57+
.dyn_into()
5658
.map_err(|_| JsValue::from_str("Failed to convert to Uint8Array"))?;
5759
array.to_vec()
5860
} else {

packages/wasm-drive-verify/src/document/verify_start_at_document_in_proof.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,9 @@ pub fn verify_start_at_document_in_proof(
5454
// For now, we need the contract to be provided as CBOR bytes through contract_js
5555
// This is a limitation until we have proper JS serialization for DataContract
5656
let contract_bytes: Vec<u8> = if contract_js.is_instance_of::<Uint8Array>() {
57-
let array: Uint8Array = contract_js.clone().dyn_into()
57+
let array: Uint8Array = contract_js
58+
.clone()
59+
.dyn_into()
5860
.map_err(|_| JsValue::from_str("Failed to convert to Uint8Array"))?;
5961
array.to_vec()
6062
} else {

packages/wasm-drive-verify/src/identity/verify_identities_contract_keys.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,7 @@ pub fn verify_identities_contract_keys(
9090
.map_err(|e| JsValue::from_str(&format!("Verification failed: {:?}", e)))?;
9191

9292
// Convert IdentitiesContractKeys to JavaScript object
93-
let keys_json = serde_json::to_value(&keys)
94-
.map_err(|e| JsValue::from_str(&format!("Failed to serialize keys: {:?}", e)))?;
95-
let keys_js = to_value(&keys_json)
93+
let keys_js = to_value(&keys)
9694
.map_err(|e| JsValue::from_str(&format!("Failed to convert keys to JsValue: {:?}", e)))?;
9795

9896
Ok(VerifyIdentitiesContractKeysResult {

0 commit comments

Comments
 (0)