Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge develop into master #8

Merged
merged 14 commits into from
Nov 13, 2024
Merged
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,5 @@ stax.hex
stax.json
flex.hex
flex.json
ledger/
app/build
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version := 3.34.0
version := latest
ledger_app_builder = ghcr.io/ledgerhq/ledger-app-builder/ledger-app-builder:$(version)
ledger_app_dev_tools = ghcr.io/ledgerhq/ledger-app-builder/ledger-app-dev-tools:$(version)

Expand Down
10 changes: 5 additions & 5 deletions app/Cargo.lock

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

6 changes: 3 additions & 3 deletions app/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
[package]
name = "alephium"
version = "0.4.0"
version = "0.4.2"
authors = ["alephium devs"]
edition = "2021"
license = "MIT"

[dependencies]
ledger_device_sdk = "=1.15.0"
ledger_secure_sdk_sys = "=1.4.4"
ledger_device_sdk = "1.18.0"
ledger_secure_sdk_sys = "1.5.1"
utils= { path = "../utils" }
numtoa = "=0.2.4"
shlex = { version = "1.3.0", default-features = false } # patch for ledger_device_sdk dependency
Expand Down
8 changes: 4 additions & 4 deletions app/src/handler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ pub fn handle_apdu(
ins: Ins,
sign_tx_context: &mut SignTxContext,
tx_reviewer: &mut TxReviewer,
) -> Result<(), io::Reply> {
) -> Result<bool, io::Reply> {
if comm.rx == 0 {
return Err(ErrorCode::BadLen.into());
}
Expand Down Expand Up @@ -118,7 +118,7 @@ pub fn handle_apdu(
};
match handle_sign_tx(apdu_header, data, sign_tx_context, tx_reviewer) {
Ok(()) if !sign_tx_context.is_complete() => {
return Ok(());
return Ok(false);
}
Ok(()) => {
// The transaction is signed when all the data is processed
Expand All @@ -129,7 +129,7 @@ pub fn handle_apdu(
let result = match sign_result {
Ok((signature_buf, length, _)) => {
comm.append(&signature_buf[..length as usize]);
Ok(())
Ok(true)
}
Err(code) => Err(code.into()),
};
Expand All @@ -143,7 +143,7 @@ pub fn handle_apdu(
}
}
}
Ok(())
Ok(true)
}

// The transaction is split into multiple APDU commands, consisting of token metadata APDU and tx APDU commands
Expand Down
11 changes: 0 additions & 11 deletions app/src/ledger_sdk_stub/mod.rs

This file was deleted.

Loading
Loading