Skip to content

Commit 5a0b3c9

Browse files
committed
use zcash_protocol's networkType and remove unused variable
1 parent 2f67099 commit 5a0b3c9

4 files changed

Lines changed: 7 additions & 5 deletions

File tree

Cargo.lock

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

crates/webzjs-common/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ edition = "2021"
1111
serde.workspace = true
1212
zcash_primitives.workspace = true
1313
zcash_address.workspace = true
14+
zcash_protocol.workspace = true
1415
thiserror.workspace = true
1516
wasm-bindgen.workspace = true
1617
js-sys.workspace = true

crates/webzjs-common/src/network.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
use crate::error::Error;
55
use serde::{Deserialize, Serialize};
66
use std::str::FromStr;
7-
use zcash_primitives::consensus::{self, Parameters};
7+
use zcash_protocol::consensus::{self, Parameters};
88

99
/// Enum representing the network type
1010
/// This is used instead of the `consensus::Network` enum so we can derive
@@ -29,10 +29,10 @@ impl FromStr for Network {
2929
}
3030

3131
impl Parameters for Network {
32-
fn network_type(&self) -> zcash_address::Network {
32+
fn network_type(&self) -> zcash_protocol::consensus::NetworkType {
3333
match self {
34-
Network::MainNetwork => zcash_address::Network::Main,
35-
Network::TestNetwork => zcash_address::Network::Test,
34+
Network::MainNetwork => zcash_protocol::consensus::NetworkType::Main,
35+
Network::TestNetwork => zcash_protocol::consensus::NetworkType::Test,
3636
}
3737
}
3838

crates/webzjs-keys/src/pczt_sign.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ pub async fn pczt_sign_inner(
131131
.finish();
132132
let mut signer = Signer::new(pczt).unwrap();
133133
//.map_err(|e| anyhow!("Failed to initialize Signer: {:?}", e))?;
134-
for (account_index, spends) in keys {
134+
for (_, spends) in keys {
135135
// let usk = UnifiedSpendingKey::from_seed(&params, seed, account_index)?;
136136
for keyref in spends {
137137
match keyref {

0 commit comments

Comments
 (0)