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

Introduce show_danger #4404

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Introduce show_danger #4404

wants to merge 1 commit into from

Conversation

ibz
Copy link
Contributor

@ibz ibz commented Nov 28, 2024

This is a unified interface for flow_warning_hi_prio, which was available only on Mercury before.

@ibz ibz self-assigned this Nov 28, 2024
Copy link

github-actions bot commented Nov 28, 2024

legacy UI changes device test(screens) main(screens)

Copy link

github-actions bot commented Nov 28, 2024

core UI changes device test click test persistence test
T2T1 Model T test(screens) main(screens) test(screens) main(screens) test(screens) main(screens)
T3B1 Safe 3 test(screens) main(screens) test(screens) main(screens) test(screens) main(screens)
T3T1 Safe 5 test(screens) main(screens) test(screens) main(screens) test(screens) main(screens)
All main(screens)

@ibz ibz linked an issue Nov 29, 2024 that may be closed by this pull request
8 tasks
@ibz ibz marked this pull request as ready for review November 29, 2024 08:24
@ibz ibz requested review from obrusvit and removed request for prusnak November 29, 2024 08:24
This is a unified interface for flow_warning_hi_prio,
which was available only on Mercury before.

[no changelog]
Copy link
Contributor

@obrusvit obrusvit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few points for discussion.

@@ -22,13 +22,13 @@ use super::super::{
};

#[derive(Copy, Clone, PartialEq, Eq)]
pub enum WarningHiPrio {
pub enum Danger {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I's slightly prefer naming this ShowDanger and also the file should be show_danger.rs.
For consistency.

def show_danger(
br_name: str,
content: str,
content_short: str | None = None,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think the distinction between content/content_short is a good idea. I think we can keep the confirm_ethereum_unknown_contract_warning function which calls the show_danger with the appropriate string.

br_code: ButtonRequestType = ButtonRequestType.Warning,
) -> Awaitable[None]:
if content_short is None:
content_short = content
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

apart from the previous comment, why showing content_short on TT?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 🔎 Needs review
Development

Successfully merging this pull request may close these issues.

Cleanup confirm_blob & related code
2 participants