Skip to content

Commit

Permalink
Code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
agrojean-ledger committed Nov 20, 2023
1 parent 9f4c4b3 commit 98f2019
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
5 changes: 2 additions & 3 deletions src/app_ui/sign.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,10 @@
*****************************************************************************/

use crate::handlers::sign_tx::Tx;
use crate::AppSW;
use ledger_device_ui_sdk::bitmaps::{CROSSMARK, EYE, VALIDATE_14};
use ledger_device_ui_sdk::ui::{Field, MultiFieldReview};

pub fn ui_display_tx(tx: &Tx) -> Result<bool, AppSW> {
pub fn ui_display_tx(tx: &Tx) -> bool {
// Define transaction review fields
let my_fields = [
Field {
Expand Down Expand Up @@ -48,5 +47,5 @@ pub fn ui_display_tx(tx: &Tx) -> Result<bool, AppSW> {
Some(&CROSSMARK),
);

Ok(my_review.show())
my_review.show()
}
2 changes: 1 addition & 1 deletion src/handlers/sign_tx.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ pub fn handler_sign_tx(
// Display transaction. If user approves
// the transaction, sign it. Otherwise,
// return a "deny" status word.
if ui_display_tx(&tx)? {
if ui_display_tx(&tx) {
return compute_signature_and_append(comm, ctx);
} else {
return Err(AppSW::Deny);
Expand Down
1 change: 0 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ use handlers::{

ledger_device_sdk::set_panic!(ledger_device_sdk::exiting_panic);

use ledger_device_sdk::testing::debug_print;
// CLA (APDU class byte) for all APDUs.
const CLA: u8 = 0xe0;
// P2 for last APDU to receive.
Expand Down

0 comments on commit 98f2019

Please sign in to comment.