Skip to content

Commit 41a34f8

Browse files
committed
Update ledger rust sdk to the latest version
1 parent 6ea1595 commit 41a34f8

File tree

8 files changed

+20
-12
lines changed

8 files changed

+20
-12
lines changed

Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,10 @@ check:
2626
echo 'Cargo fmt' && \
2727
cargo fmt --all -- --check && \
2828
echo 'Cargo clippy' && \
29-
cargo +nightly-2023-11-10 clippy --target=nanox && \
30-
cargo +nightly-2023-11-10 clippy --target=stax && \
29+
cargo +nightly-2024-12-01 clippy --target=nanox && \
30+
cargo +nightly-2024-12-01 clippy --target=stax && \
3131
cargo install cargo-audit && cargo audit && \
32-
cargo install --locked cargo-deny && cargo +nightly-2023-11-10 deny check \
32+
cargo install --locked cargo-deny && cargo +nightly-2024-12-01 deny check \
3333
"
3434

3535
_run-speculos:

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: 5 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.18.0"
10-
ledger_secure_sdk_sys = "1.5.1"
9+
ledger_device_sdk = "1.21.4"
10+
ledger_secure_sdk_sys = { version = "1.7.2", features = ["heap"]}
1111
utils= { path = "../utils" }
1212
numtoa = "=0.2.4"
1313
shlex = { version = "1.3.0", default-features = false } # patch for ledger_device_sdk dependency
@@ -40,3 +40,6 @@ icon = "alph_32x32.gif"
4040

4141
[package.metadata.ledger.flex]
4242
icon = "alph_40x40.gif"
43+
44+
[lints.rust]
45+
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(target_os, values("stax", "flex", "nanox", "nanosplus"))'] }

app/src/main.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ extern "C" fn sample_main() {
4747
}
4848
}
4949

50+
#[allow(static_mut_refs)]
5051
#[cfg(any(target_os = "stax", target_os = "flex"))]
5152
{
5253
use crate::settings::SETTINGS_DATA;
@@ -55,10 +56,10 @@ extern "C" fn sample_main() {
5556
use ledger_device_sdk::nbgl::{NbglGlyph, NbglHomeAndSettings, PageIndex};
5657

5758
const APP_ICON: NbglGlyph = NbglGlyph::from_include(include_gif!("alph_64x64.gif", NBGL));
58-
let settings_strings: &[[&str; 2]] = &[["Blind signing", "Enable blind signing"]];
59+
let settings_strings = [["Blind signing", "Enable blind signing"]];
5960
let mut home_and_settings = NbglHomeAndSettings::new()
6061
.glyph(&APP_ICON)
61-
.settings(unsafe { SETTINGS_DATA.get_mut() }, settings_strings)
62+
.settings(unsafe { SETTINGS_DATA.get_mut() }, &settings_strings)
6263
.infos(
6364
"Alephium",
6465
env!("CARGO_PKG_VERSION"),

app/src/settings.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,13 @@ pub const SETTINGS_SIZE: usize = 10;
77
pub static mut SETTINGS_DATA: NVMData<AtomicStorage<[u8; SETTINGS_SIZE]>> =
88
NVMData::new(AtomicStorage::new(&[0u8; SETTINGS_SIZE]));
99

10+
#[allow(static_mut_refs)]
1011
pub fn is_blind_signing_enabled() -> bool {
1112
let settings = unsafe { SETTINGS_DATA.get_mut() };
1213
settings.get_ref()[0] != 0
1314
}
1415

16+
#[allow(static_mut_refs)]
1517
#[cfg(not(any(target_os = "stax", target_os = "flex")))]
1618
pub fn toggle_blind_signing_setting() {
1719
let settings = unsafe { SETTINGS_DATA.get_mut() };

app/src/sign_tx_context.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ pub struct SignTxContext {
3838
}
3939

4040
impl SignTxContext {
41+
#[allow(static_mut_refs)]
4142
pub fn new() -> Self {
4243
SignTxContext {
4344
path: [0; PATH_LENGTH],

app/src/ui/tx_reviewer.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ pub struct TxReviewer {
4444
}
4545

4646
impl TxReviewer {
47+
#[allow(static_mut_refs)]
4748
pub fn new() -> Self {
4849
Self {
4950
buffer: unsafe { SwappingBuffer::new(&mut DATA) },

js/docker/docker-compose.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ version: "3.3"
22

33
services:
44
alephium:
5-
image: alephium/alephium:v3.3.0
5+
image: alephium/alephium:v3.12.3
66
restart: "no"
77
ports:
88
- 19973:19973/tcp

0 commit comments

Comments
 (0)