Skip to content

Commit

Permalink
Updates following PR review
Browse files Browse the repository at this point in the history
  • Loading branch information
yogh333 committed Oct 16, 2024
1 parent 828fa68 commit a2d8eb7
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 36 deletions.
13 changes: 4 additions & 9 deletions src/app_ui/address.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,15 +60,10 @@ pub fn ui_display_pk_base58(public_key: &crypto::PublicKeyBe) -> Result<bool, Ap
.verify_str("Confirm Public Key");

let res = review.show(out_buf.as_str());
let status = NbglReviewStatus::new();
match res {
true => {
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)
}
Expand Down
11 changes: 2 additions & 9 deletions src/app_ui/sign/common/action/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

Expand Down
14 changes: 5 additions & 9 deletions src/app_ui/sign/nep366_delegate_action/suffix.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
14 changes: 5 additions & 9 deletions src/app_ui/sign/nep413/payload.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}

0 comments on commit a2d8eb7

Please sign in to comment.