diff --git a/src/app_ui/address.rs b/src/app_ui/address.rs index fa79d6d..8c18559 100644 --- a/src/app_ui/address.rs +++ b/src/app_ui/address.rs @@ -60,15 +60,10 @@ pub fn ui_display_pk_base58(public_key: &crypto::PublicKeyBe) -> Result { - status.status_type(StatusType::Address).show(true); - } - false => { - status.status_type(StatusType::Address).show(false); - } - } + + NbglReviewStatus::new() + .status_type(StatusType::Address) + .show(res); Ok(res) } diff --git a/src/app_ui/sign/common/action/mod.rs b/src/app_ui/sign/common/action/mod.rs index 186a438..e10e158 100644 --- a/src/app_ui/sign/common/action/mod.rs +++ b/src/app_ui/sign/common/action/mod.rs @@ -216,15 +216,8 @@ pub fn ui_display_delegate_error(#[allow(unused)] comm: &mut Comm) { NbglGenericReview::new().add_content(NbglPageContent::InfoButton(info_button)); let res = review.show("Reject"); - let status: NbglStatus = NbglStatus::new(); - match res { - true => { - status.text("Transaction rejected").show(true); - } - false => { - status.text("Transaction rejected").show(false); - } - } + + NbglStatus::new().text("Transaction rejected").show(res); } } diff --git a/src/app_ui/sign/nep366_delegate_action/suffix.rs b/src/app_ui/sign/nep366_delegate_action/suffix.rs index 315b039..851315d 100644 --- a/src/app_ui/sign/nep366_delegate_action/suffix.rs +++ b/src/app_ui/sign/nep366_delegate_action/suffix.rs @@ -97,15 +97,11 @@ pub fn ui_display(suffix: &parsing::types::nep366_delegate_action::suffix::Suffi .glyph(&NEAR_LOGO); let res = review.show(field_writer.get_fields()); - let status = NbglReviewStatus::new(); - match res { - true => { - status.status_type(StatusType::Transaction).show(true); - } - false => { - status.status_type(StatusType::Transaction).show(false); - } - } + + NbglReviewStatus::new() + .status_type(StatusType::Transaction) + .show(res); + res } } diff --git a/src/app_ui/sign/nep413/payload.rs b/src/app_ui/sign/nep413/payload.rs index a5b362c..5cf8d3c 100644 --- a/src/app_ui/sign/nep413/payload.rs +++ b/src/app_ui/sign/nep413/payload.rs @@ -106,15 +106,11 @@ pub fn ui_display(payload: &mut Payload) -> bool { .glyph(&NEAR_LOGO); let res = review.show(field_writer.get_fields()); - let status = NbglReviewStatus::new(); - match res { - true => { - status.status_type(StatusType::Message).show(true); - } - false => { - status.status_type(StatusType::Message).show(false); - } - } + + NbgReviewStatus::new() + .status_type(StatusType::Message) + .show(res); + res } }