Skip to content

Commit

Permalink
feat(wasm-dpp): add entropy getter for documenttransition
Browse files Browse the repository at this point in the history
  • Loading branch information
pshenmic committed Dec 27, 2024
1 parent bab0359 commit 701d1b5
Showing 1 changed file with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,17 @@ impl DocumentTransitionWasm {
JsValue::NULL
}
}
#[wasm_bindgen(js_name=getEntropy)]
pub fn get_revision(&self) -> Vec<u8> {

Check failure on line 91 in packages/wasm-dpp/src/document/state_transition/document_batch_transition/document_transition/mod.rs

View workflow job for this annotation

GitHub Actions / Rust packages (wasm-dpp) / Linting

duplicate definitions with name `get_revision`

error[E0592]: duplicate definitions with name `get_revision` --> packages/wasm-dpp/src/document/state_transition/document_batch_transition/document_transition/mod.rs:91:5 | 83 | pub fn get_revision(&self) -> JsValue { | ------------------------------------- other definition for `get_revision` ... 91 | pub fn get_revision(&self) -> Vec<u8> { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ duplicate definitions for `get_revision`
match self.0.clone() {
DocumentTransition::Create(document_transition) => Vec::from(document_transition.entropy()),
DocumentTransition::Replace(document_transition) => Vec::from(document_transition.entropy()),

Check failure on line 94 in packages/wasm-dpp/src/document/state_transition/document_batch_transition/document_transition/mod.rs

View workflow job for this annotation

GitHub Actions / Rust packages (wasm-dpp) / Linting

no method named `entropy` found for enum `dpp::state_transition::documents_batch_transition::DocumentReplaceTransition` in the current scope

error[E0599]: no method named `entropy` found for enum `dpp::state_transition::documents_batch_transition::DocumentReplaceTransition` in the current scope --> packages/wasm-dpp/src/document/state_transition/document_batch_transition/document_transition/mod.rs:94:95 | 94 | DocumentTransition::Replace(document_transition) => Vec::from(document_transition.entropy()), | ^^^^^^^ method not found in `DocumentReplaceTransition`
DocumentTransition::Delete(document_transition) => Vec::from(document_transition.entropy()),

Check failure on line 95 in packages/wasm-dpp/src/document/state_transition/document_batch_transition/document_transition/mod.rs

View workflow job for this annotation

GitHub Actions / Rust packages (wasm-dpp) / Linting

no method named `entropy` found for enum `dpp::state_transition::documents_batch_transition::DocumentDeleteTransition` in the current scope

error[E0599]: no method named `entropy` found for enum `dpp::state_transition::documents_batch_transition::DocumentDeleteTransition` in the current scope --> packages/wasm-dpp/src/document/state_transition/document_batch_transition/document_transition/mod.rs:95:94 | 95 | DocumentTransition::Delete(document_transition) => Vec::from(document_transition.entropy()), | ^^^^^^^ method not found in `DocumentDeleteTransition`
DocumentTransition::Transfer(document_transition) => Vec::from(document_transition.entropy()),

Check failure on line 96 in packages/wasm-dpp/src/document/state_transition/document_batch_transition/document_transition/mod.rs

View workflow job for this annotation

GitHub Actions / Rust packages (wasm-dpp) / Linting

no method named `entropy` found for enum `dpp::state_transition::documents_batch_transition::document_transition::DocumentTransferTransition` in the current scope

error[E0599]: no method named `entropy` found for enum `dpp::state_transition::documents_batch_transition::document_transition::DocumentTransferTransition` in the current scope --> packages/wasm-dpp/src/document/state_transition/document_batch_transition/document_transition/mod.rs:96:96 | 96 | DocumentTransition::Transfer(document_transition) => Vec::from(document_transition.entropy()), | ^^^^^^^ method not found in `DocumentTransferTransition`
DocumentTransition::UpdatePrice(document_transition) => Vec::from(document_transition.entropy()),

Check failure on line 97 in packages/wasm-dpp/src/document/state_transition/document_batch_transition/document_transition/mod.rs

View workflow job for this annotation

GitHub Actions / Rust packages (wasm-dpp) / Linting

no method named `entropy` found for enum `dpp::state_transition::documents_batch_transition::document_transition::DocumentUpdatePriceTransition` in the current scope

error[E0599]: no method named `entropy` found for enum `dpp::state_transition::documents_batch_transition::document_transition::DocumentUpdatePriceTransition` in the current scope --> packages/wasm-dpp/src/document/state_transition/document_batch_transition/document_transition/mod.rs:97:99 | 97 | DocumentTransition::UpdatePrice(document_transition) => Vec::from(document_transition.entropy()), | ^^^^^^^ method not found in `DocumentUpdatePriceTransition`
DocumentTransition::Purchase(document_transition) => Vec::from(document_transition.entropy()),

Check failure on line 98 in packages/wasm-dpp/src/document/state_transition/document_batch_transition/document_transition/mod.rs

View workflow job for this annotation

GitHub Actions / Rust packages (wasm-dpp) / Linting

no method named `entropy` found for enum `dpp::state_transition::documents_batch_transition::document_transition::DocumentPurchaseTransition` in the current scope

error[E0599]: no method named `entropy` found for enum `dpp::state_transition::documents_batch_transition::document_transition::DocumentPurchaseTransition` in the current scope --> packages/wasm-dpp/src/document/state_transition/document_batch_transition/document_transition/mod.rs:98:96 | 98 | DocumentTransition::Purchase(document_transition) => Vec::from(document_transition.entropy()), | ^^^^^^^ method not found in `DocumentPurchaseTransition`
}
}

#[wasm_bindgen(js_name=setRevision)]
pub fn set_revision(&mut self, revision: u32) {
Expand Down

0 comments on commit 701d1b5

Please sign in to comment.