Skip to content

Commit

Permalink
Fix display address usecase
Browse files Browse the repository at this point in the history
  • Loading branch information
yogh333 committed Sep 27, 2024
1 parent 3e5ca69 commit 61621c1
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions src/app_ui/address.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ use fmt_buffer::Buffer;
#[cfg(any(target_os = "stax", target_os = "flex"))]
use include_gif::include_gif;
#[cfg(any(target_os = "stax", target_os = "flex"))]
use ledger_device_sdk::nbgl::{NbglAddressReview, NbglGlyph};
use ledger_device_sdk::nbgl::{NbglAddressReview, NbglGlyph, NbglReviewStatus, StatusType};
#[cfg(not(any(target_os = "stax", target_os = "flex")))]
use ledger_device_sdk::ui::bitmaps::{CROSSMARK, EYE, VALIDATE_14};
#[cfg(not(any(target_os = "stax", target_os = "flex")))]
Expand Down Expand Up @@ -59,7 +59,18 @@ pub fn ui_display_pk_base58(public_key: &crypto::PublicKeyBe) -> Result<bool, Ap
.glyph(&NEAR_LOGO)
.verify_str("Confirm Public Key");

Ok(review.show(out_buf.as_str()))
let res = review.show(out_buf.as_str());
let mut status = NbglReviewStatus::new();
match res {
true => {
status.status_type(StatusType::Address).show(true);
}
false => {
status.status_type(StatusType::Address).show(false);
}
}

Ok(res)
}
}

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 61621c1

Please sign in to comment.