Skip to content

Commit

Permalink
Merge pull request #57 from LedgerHQ/bboilot/update_sdk
Browse files Browse the repository at this point in the history
Update rust SDK and fix keccak256 declaration
  • Loading branch information
bboilot-ledger committed Apr 3, 2024
2 parents 9f37efc + 015f922 commit 064b0aa
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions Cargo.lock

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

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
[package]
name = "app-boilerplate-rust"
version = "1.2.3"
version = "1.2.4"
authors = ["yhql", "agrojean-ledger"]
edition = "2021"

[dependencies]
ledger_device_sdk = "1.7.1"
ledger_device_sdk = "1.8.0"
include_gif = "1.0.1"
serde = {version="1.0.192", default_features = false, features = ["derive"]}
serde-json-core = { git = "https://github.com/rust-embedded-community/serde-json-core"}
Expand Down
2 changes: 1 addition & 1 deletion src/handlers/get_public_key.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ pub fn handler_get_public_key(comm: &mut Comm, display: bool) -> Result<(), AppS

// Display address on device if requested
if display {
let keccak256 = Keccak256::new();
let mut keccak256 = Keccak256::new();
let mut address: [u8; 32] = [0u8; 32];

let _ = keccak256.hash(&pk.pubkey[1..], &mut address);
Expand Down
2 changes: 1 addition & 1 deletion src/handlers/sign_tx.rs
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ pub fn handler_sign_tx(
}

fn compute_signature_and_append(comm: &mut Comm, ctx: &mut TxContext) -> Result<(), AppSW> {
let keccak256 = Keccak256::new();
let mut keccak256 = Keccak256::new();
let mut message_hash: [u8; 32] = [0u8; 32];

let _ = keccak256.hash(&ctx.raw_tx[..ctx.raw_tx_len], &mut message_hash);
Expand Down
Binary file modified tests/snapshots/nanos/test_app_mainmenu/00001.png
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/snapshots/nanosp/test_app_mainmenu/00001.png
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/snapshots/nanox/test_app_mainmenu/00001.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion tests/test_version_cmd.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# Taken from the Cargo.toml, to update every time the version is bumped
MAJOR = 1
MINOR = 2
PATCH = 3
PATCH = 4

# In this test we check the behavior of the device when asked to provide the app version
def test_version(backend):
Expand Down

0 comments on commit 064b0aa

Please sign in to comment.