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

Feat/use ledger device sdk only #37

Merged
merged 5 commits into from
Dec 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
[package]
name = "app-boilerplate-rust"
version = "1.0.0"
version = "1.1.0"
authors = ["yhql", "agrojean-ledger"]
edition = "2021"

[dependencies]
ledger_device_sdk = "1.0.1"
ledger_device_ui_sdk = "1.1.1"
ledger_secure_sdk_sys = "1.0.1"
include_gif = "1.0.0"
ledger_device_sdk = "1.1.0"
ledger_secure_sdk_sys = "1.0.2"
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"}
hex = { version = "0.4.3", default-features = false, features = ["serde"] }
Expand Down
4 changes: 2 additions & 2 deletions src/app_ui/address.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@

use crate::AppSW;
use core::str::from_utf8_mut;
use ledger_device_ui_sdk::bitmaps::{CROSSMARK, EYE, VALIDATE_14};
use ledger_device_ui_sdk::ui::{Field, MultiFieldReview};
use ledger_device_sdk::ui::bitmaps::{CROSSMARK, EYE, VALIDATE_14};
use ledger_device_sdk::ui::gadgets::{Field, MultiFieldReview};

// Display only the last 20 bytes of the address
const DISPLAY_ADDR_BYTES_LEN: usize = 20;
Expand Down
4 changes: 2 additions & 2 deletions src/app_ui/menu.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@

use include_gif::include_gif;
use ledger_device_sdk::io::{ApduHeader, Comm, Event};
use ledger_device_ui_sdk::bitmaps::{Glyph, BACK, CERTIFICATE, DASHBOARD_X};
use ledger_device_ui_sdk::ui::{EventOrPageIndex, MultiPageMenu, Page};
use ledger_device_sdk::ui::bitmaps::{Glyph, BACK, CERTIFICATE, DASHBOARD_X};
use ledger_device_sdk::ui::gadgets::{EventOrPageIndex, MultiPageMenu, Page};

fn ui_about_menu(comm: &mut Comm) -> Event<ApduHeader> {
let pages = [
Expand Down
4 changes: 2 additions & 2 deletions src/app_ui/sign.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
use crate::handlers::sign_tx::Tx;
use crate::utils::concatenate;
use crate::AppSW;
use ledger_device_ui_sdk::bitmaps::{CROSSMARK, EYE, VALIDATE_14};
use ledger_device_ui_sdk::ui::{Field, MultiFieldReview};
use ledger_device_sdk::ui::bitmaps::{CROSSMARK, EYE, VALIDATE_14};
use ledger_device_sdk::ui::gadgets::{Field, MultiFieldReview};
use numtoa::NumToA;

const MAX_COIN_LENGTH: usize = 10;
Expand Down
6 changes: 3 additions & 3 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,9 @@ fn display_pending_review(comm: &mut Comm) {
use ledger_device_sdk::buttons::ButtonEvent::{
BothButtonsRelease, LeftButtonRelease, RightButtonRelease,
};
use ledger_device_ui_sdk::layout::{Layout, Location, StringPlace};
use ledger_device_ui_sdk::screen_util::screen_update;
use ledger_device_ui_sdk::ui::clear_screen;
use ledger_device_sdk::ui::gadgets::clear_screen;
use ledger_device_sdk::ui::layout::{Layout, Location, StringPlace};
use ledger_device_sdk::ui::screen_util::screen_update;

clear_screen();
"Pending Review".place(Location::Middle, Layout::Centered, false);
Expand Down
Binary file modified tests/snapshots/nanos/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/nanosp/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/nanox/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.
2 changes: 1 addition & 1 deletion tests/test_version_cmd.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

# Taken from the Cargo.toml, to update every time the version is bumped
MAJOR = 1
MINOR = 0
MINOR = 1
PATCH = 0

# In this test we check the behavior of the device when asked to provide the app version
Expand Down
Loading