Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
saefstroem committed Jan 31, 2025
1 parent 5ba17dc commit 55d6d3e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
1 change: 0 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion wallet/pskt/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ serde_json.workspace = true
serde-wasm-bindgen.workspace = true
workflow-wasm.workspace = true
separator.workspace = true
workflow-log.workspace = true

[dev-dependencies]
serde_json.workspace = true
Expand Down
6 changes: 3 additions & 3 deletions wallet/pskt/src/wasm/pskt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ use crate::role::*;
use kaspa_consensus_core::network::NetworkType;
use kaspa_consensus_core::tx::TransactionId;
use wasm_bindgen::prelude::*;
use workflow_log::log_error;
// use js_sys::Object;
use crate::pskt::Inner;
use kaspa_consensus_client::{Transaction, TransactionInput, TransactionInputT, TransactionOutput, TransactionOutputT};
Expand Down Expand Up @@ -361,9 +360,10 @@ impl PSKT {
let cloned_pskt = self.clone();
let extractor = cloned_pskt.extractor()?;
let state = extractor.state().clone().expect("Extractor state is not valid");
match pskt {
match state {
State::Extractor(pskt) => {
let tx = pskt.extract_tx(&network_id.into()).map_err(|_| Error::custom("Failed to extract transaction"))?;
let tx =
pskt.extract_tx(&network_id.into()).map_err(|e| Error::custom(format!("Failed to extract transaction: {e}")))?;
Ok(tx.tx.mass())
}
_ => panic!("Extractor state is not valid"),
Expand Down

0 comments on commit 55d6d3e

Please sign in to comment.