Skip to content

Commit

Permalink
feat: use new references for zcash tools on tests (#132)
Browse files Browse the repository at this point in the history
* feat: use new references for zcash tools on tests

* chore: bump app version

* chore: bump snapshots
  • Loading branch information
emmanuelm41 authored Nov 27, 2024
1 parent c2a9c9f commit 6f4429a
Show file tree
Hide file tree
Showing 15 changed files with 50 additions and 29 deletions.
2 changes: 1 addition & 1 deletion app/Makefile.version
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ APPVERSION_M=4
# This is the minor version
APPVERSION_N=2
# This is the patch version
APPVERSION_P=3
APPVERSION_P=4
Binary file modified tests_zemu/snapshots/fl-mainmenu/00004.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests_zemu/snapshots/s-mainmenu/00004.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests_zemu/snapshots/s-mainmenu/00010.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests_zemu/snapshots/sp-mainmenu/00004.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests_zemu/snapshots/sp-mainmenu/00010.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests_zemu/snapshots/st-mainmenu/00004.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests_zemu/snapshots/x-mainmenu/00004.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests_zemu/snapshots/x-mainmenu/00010.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 6f4429a

Please sign in to comment.