Skip to content

Commit 7d5fea9

Browse files
authored
Merge pull request #32 from alephium/update-sdk-to-1.17.1
Update ledger sdk to 1.17.1
2 parents 6eafe5f + 77306c4 commit 7d5fea9

20 files changed

+143
-933
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,5 @@ stax.hex
1111
stax.json
1212
flex.hex
1313
flex.json
14+
ledger/
15+
app/build

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version := 3.34.0
1+
version := latest
22
ledger_app_builder = ghcr.io/ledgerhq/ledger-app-builder/ledger-app-builder:$(version)
33
ledger_app_dev_tools = ghcr.io/ledgerhq/ledger-app-builder/ledger-app-dev-tools:$(version)
44

app/Cargo.lock

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

app/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ edition = "2021"
66
license = "MIT"
77

88
[dependencies]
9-
ledger_device_sdk = "=1.15.0"
10-
ledger_secure_sdk_sys = "=1.4.4"
9+
ledger_device_sdk = "1.17.1"
10+
ledger_secure_sdk_sys = "1.5.0"
1111
utils= { path = "../utils" }
1212
numtoa = "=0.2.4"
1313
shlex = { version = "1.3.0", default-features = false } # patch for ledger_device_sdk dependency

app/src/handler.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ pub fn handle_apdu(
4343
ins: Ins,
4444
sign_tx_context: &mut SignTxContext,
4545
tx_reviewer: &mut TxReviewer,
46-
) -> Result<(), io::Reply> {
46+
) -> Result<bool, io::Reply> {
4747
if comm.rx == 0 {
4848
return Err(ErrorCode::BadLen.into());
4949
}
@@ -118,7 +118,7 @@ pub fn handle_apdu(
118118
};
119119
match handle_sign_tx(apdu_header, data, sign_tx_context, tx_reviewer) {
120120
Ok(()) if !sign_tx_context.is_complete() => {
121-
return Ok(());
121+
return Ok(false);
122122
}
123123
Ok(()) => {
124124
// The transaction is signed when all the data is processed
@@ -129,7 +129,7 @@ pub fn handle_apdu(
129129
let result = match sign_result {
130130
Ok((signature_buf, length, _)) => {
131131
comm.append(&signature_buf[..length as usize]);
132-
Ok(())
132+
Ok(true)
133133
}
134134
Err(code) => Err(code.into()),
135135
};
@@ -143,7 +143,7 @@ pub fn handle_apdu(
143143
}
144144
}
145145
}
146-
Ok(())
146+
Ok(true)
147147
}
148148

149149
// The transaction is split into multiple APDU commands, consisting of token metadata APDU and tx APDU commands

app/src/ledger_sdk_stub/mod.rs

Lines changed: 0 additions & 11 deletions
This file was deleted.

0 commit comments

Comments
 (0)