Skip to content

Commit

Permalink
feat: use new references for zcash tools on tests
Browse files Browse the repository at this point in the history
  • Loading branch information
emmanuelm41 committed Nov 27, 2024
1 parent c2a9c9f commit c26803f
Show file tree
Hide file tree
Showing 6 changed files with 49 additions and 28 deletions.
47 changes: 34 additions & 13 deletions zcashtools/Cargo.lock

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

8 changes: 4 additions & 4 deletions zcashtools/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ opt-level = "s"
overflow-checks = true

[patch.crates-io]
ledger-zcash-builder = { git = "https://github.com/Zondax/ledger-zcash-rs", rev = "3bad2fa4a7870270627edc25ebdb5b4818fd1855" }
ledger-zcash = { git = "https://github.com/Zondax/ledger-zcash-rs", rev = "3bad2fa4a7870270627edc25ebdb5b4818fd1855" }
ledger-zcash-chain-builder = { git = "https://github.com/Zondax/ledger-zcash-tools", tag = "v2.0.0" }
ledger-zcash-app-builder = { git = "https://github.com/Zondax/ledger-zcash-tools", tag = "v2.0.0" }

# ledger-zcash-builder = { path = "../../ledger-zcash-rs/ledger-zcash-builder" }
# ledger-zcash = { path = "../../ledger-zcash-rs/ledger-zcash" }
# ledger-zcash-chain-builder = { path = "../../ledger-zcash-tools/ledger-zcash-chain-builder" }
# ledger-zcash-app-builder = { path = "../../ledger-zcash-tools/ledger-zcash-app-builder" }
6 changes: 3 additions & 3 deletions zcashtools/neon/native/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@ serde_derive = "1"
serde = "1"
log = "0.4"
snafu = { version = "0.8.2" }
zcash_primitives = { git = "https://github.com/Zondax/librustzcash", rev = "112eedd27b2e51b9e1b77603a776cd78e738c3ae", features = ["transparent-inputs"], package = "zcash_primitives" }
zcash_primitives = { git = "https://github.com/Zondax/librustzcash", rev = "ce278848fef35903db46c3dced41658e90bbeb3c", features = ["transparent-inputs"], package = "zcash_primitives" }

neon-serde = { git = "https://github.com/Zondax/neon-serde", branch = "master", default-features = false, features = [
"napi-6",
] }

ledger-zcash-builder = { git = "https://github.com/Zondax/ledger-zcash-rs", rev = "3bad2fa4a7870270627edc25ebdb5b4818fd1855", package = "ledger-zcash-builder" }
ledger-zcash = { git = "https://github.com/Zondax/ledger-zcash-rs", rev = "3bad2fa4a7870270627edc25ebdb5b4818fd1855", package = "ledger-zcash" }
ledger-zcash-chain-builder = { git = "https://github.com/Zondax/ledger-zcash-tools", tag = "v2.0.0", package = "ledger-zcash-chain-builder" }
ledger-zcash-app-builder = { git = "https://github.com/Zondax/ledger-zcash-tools", tag = "v2.0.0", package = "ledger-zcash-app-builder" }

[dev-dependencies]
serde = { version = "1", features = ["derive"] }
Expand Down
8 changes: 4 additions & 4 deletions zcashtools/neon/native/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
use ledger_zcash_builder::data::{
use ledger_zcash_chain_builder::data::{
HsmTxData, InitData, OutputBuilderInfo, SpendBuilderInfo, TransactionSignatures,
TransparentInputBuilderInfo, TransparentOutputBuilderInfo,
};
use ledger_zcash_builder::errors::Error;
use ledger_zcash_builder::{hsmauth, txbuilder, txprover};
use ledger_zcash_chain_builder::errors::Error;
use ledger_zcash_chain_builder::{hsmauth, txbuilder, txprover};
use neon::prelude::*;
use std::cell::RefCell;
use std::path::Path;
Expand Down Expand Up @@ -45,7 +45,7 @@ fn calculate_zip0317_fee(mut cx: FunctionContext) -> JsResult<JsNumber> {
];

let fee: u64 =
ledger_zcash::builder::Builder::calculate_zip0317_fee(n_tin, n_tout, n_spend, n_sout)
ledger_zcash_app_builder::builder::Builder::calculate_zip0317_fee(n_tin, n_tout, n_spend, n_sout)
.into();

Ok(cx.number(fee as f64))
Expand Down
4 changes: 2 additions & 2 deletions zcashtools/neon/native/tests/builder_test.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use env_logger::Env;
use ledger_zcash::builder::Builder as ZcashBuilder;
use ledger_zcash_builder::{
use ledger_zcash_app_builder::builder::Builder as ZcashBuilder;
use ledger_zcash_chain_builder::{
data::{OutputBuilderInfo, SpendBuilderInfo},
txbuilder::Builder,
};
Expand Down
4 changes: 2 additions & 2 deletions zcashtools/neon/native/tests/builder_test2.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use env_logger::Env;
use ledger_zcash::builder::Builder as ZcashBuilder;
use ledger_zcash_builder::{
use ledger_zcash_app_builder::builder::Builder as ZcashBuilder;
use ledger_zcash_chain_builder::{
data::{TransparentInputBuilderInfo, TransparentOutputBuilderInfo},
txbuilder::Builder,
};
Expand Down

0 comments on commit c26803f

Please sign in to comment.