Skip to content

Commit

Permalink
Merge pull request #25 from LedgerHQ/y333/use_allocator
Browse files Browse the repository at this point in the history
Bump SDK version
  • Loading branch information
yogh333 authored Jul 2, 2024
2 parents 588c669 + d2c6be5 commit eb0a93a
Show file tree
Hide file tree
Showing 48 changed files with 41 additions and 17 deletions.
2 changes: 1 addition & 1 deletion .cargo/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ runner = "speculos -a=1 --model=nanosp"
target = "nanosplus"

[unstable]
build-std = ["core"]
build-std = ["core", "alloc"]
build-std-features = ["compiler-builtins-mem"]
34 changes: 29 additions & 5 deletions Cargo.lock

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

7 changes: 2 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
[package]
name = "starknet"
version = "1.2.1"
version = "1.2.2"
edition = "2021"
authors = ["Ledger"]

[dependencies]
ledger_device_sdk = "1.10.2"
ledger_device_sdk = "1.10.5"
include_gif = "1.1.0"
hex = { version = "0.4", default-features = false }

Expand All @@ -27,9 +27,6 @@ path = ["2645'"]
name = "Starknet"
flags = "0"

[package.metadata.ledger.nanos]
icon = "crab.gif"

[package.metadata.ledger.nanox]
icon = "starknet_small.gif"

Expand Down
Binary file removed crab.gif
Binary file not shown.
4 changes: 2 additions & 2 deletions docs/build.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ docker pull ghcr.io/ledgerhq/ledger-app-builder/ledger-app-builder
git clone https://github.com/LedgerHQ/app-starknet.git
```

Build for Nano S/S+/X/Stax/Flex:
Build for Nano S+/X/Stax/Flex:
```
docker run --rm -it -v "$(pwd -P):/apps" ghcr.io/ledgerhq ledger-app-builder/ledger-app-builder
cd /apps/app-starknet/
cargo clean
cargo ledger build nanos|nanosplus|nanox|stax|flex
cargo ledger build nanosplus|nanox|stax|flex
```
2 changes: 1 addition & 1 deletion docs/test.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ docker pull ghcr.io/ledgerhq/ledger-app-builder/ledger-app-dev-tools
docker run --rm -it -v "$(pwd -P):/apps" --publish 5001:5001 --publish 9999:9999 ghcr.io/ledgerhq/ledger-app-builder/ledger-app-dev-tools
cd /apps/app-starknet
pip install -r tests/requirements.txt
pytest tests/ --tb=short -v --device {nanos | nanosp | nanox | stax | flex}
pytest tests/ --tb=short -v --device {nanosp | nanox | stax | flex}
```

### Emulator
Expand Down
2 changes: 1 addition & 1 deletion ledger_app.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[app]
build_directory = "./"
sdk = "Rust"
devices = ["nanos", "nanox", "nanos+", "stax", "flex"]
devices = ["nanox", "nanos+", "stax", "flex"]

[tests]
pytest_directory = "./tests/"
7 changes: 5 additions & 2 deletions src/display.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ pub fn sign_ui(message: &[u8]) -> bool {
value: hash,
}];

let mut review = NbglReview::<1, 256>::new()
let mut review = NbglReview::new()
.titles("Review", "Transaction Hash", "Sign Transaction")
.glyph(&APP_ICON);
review.show(&my_fields)
Expand Down Expand Up @@ -109,7 +109,10 @@ pub fn pkey_ui(key: &[u8]) -> bool {
// Load glyph from 64x64 4bpp gif file with include_gif macro. Creates an NBGL compatible glyph.
const APP_ICON: NbglGlyph =
NbglGlyph::from_include(include_gif!("starknet_64x64.gif", NBGL));
NbglAddressReview::new().glyph(&APP_ICON).show(m)
NbglAddressReview::new()
.glyph(&APP_ICON)
.verify_str("Verify public key")
.show(m)
}
}

Expand Down
Binary file modified tests/snapshots/flex/test_app_mainmenu/00000.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/snapshots/flex/test_app_mainmenu/00001.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/snapshots/flex/test_app_mainmenu/00002.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/snapshots/flex/test_get_public_key_confirm_accepted/00000.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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/snapshots/flex/test_sign_hash_0/00000.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/snapshots/flex/test_sign_hash_0/00001.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/snapshots/flex/test_sign_hash_0/00002.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/snapshots/flex/test_sign_hash_0/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/snapshots/flex/test_sign_hash_1/00000.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/snapshots/flex/test_sign_hash_1/00001.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/snapshots/flex/test_sign_hash_1/00002.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/snapshots/flex/test_sign_hash_1/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/snapshots/flex/test_sign_hash_2/00000.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/snapshots/flex/test_sign_hash_2/00001.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/snapshots/flex/test_sign_hash_2/00002.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/snapshots/flex/test_sign_hash_2/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/snapshots/flex/test_sign_hash_3/00000.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/snapshots/flex/test_sign_hash_3/00001.png
Binary file modified tests/snapshots/flex/test_sign_hash_3/00002.png
Binary file modified tests/snapshots/flex/test_sign_hash_3/00004.png
Binary file modified tests/snapshots/flex/test_sign_hash_4/00000.png
Binary file modified tests/snapshots/flex/test_sign_hash_4/00001.png
Binary file modified tests/snapshots/flex/test_sign_hash_4/00002.png
Binary file modified tests/snapshots/flex/test_sign_hash_4/00004.png
Binary file modified tests/snapshots/flex/test_sign_hash_refused/00000.png
Binary file modified tests/snapshots/flex/test_sign_hash_refused/00001.png
Binary file modified tests/snapshots/flex/test_sign_hash_refused/00004.png
Binary file modified tests/snapshots/nanosp/test_app_mainmenu/00001.png
Binary file modified tests/snapshots/nanox/test_app_mainmenu/00001.png
Binary file modified tests/snapshots/stax/test_app_mainmenu/00001.png
Binary file modified tests/snapshots/stax/test_get_public_key_confirm_accepted/00000.png

0 comments on commit eb0a93a

Please sign in to comment.