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

Cleanup after ETH contract flow #4343

Merged
merged 5 commits into from
Nov 19, 2024
Merged

Cleanup after ETH contract flow #4343

merged 5 commits into from
Nov 19, 2024

Conversation

ibz
Copy link
Contributor

@ibz ibz commented Nov 12, 2024

This PR fixes some of the mess caused by #4270

  • we now use warning_hi_prio instead of having that functionality duplicated into confirm_blob
  • confirm_blob_with_optional_pagination is gone, and we are back to having ask_pagination as a parameter on confirm_blob

NB: This PR prevents the Marquee on model R from crashing, but it also makes it not scroll anymore.

@ibz ibz self-assigned this Nov 12, 2024
@ibz ibz changed the title Ibz/20241112 cleanup Cleanup after ETH contract flow Nov 12, 2024
@ibz ibz requested a review from obrusvit November 12, 2024 16:45
@ibz ibz linked an issue Nov 12, 2024 that may be closed by this pull request
Copy link

github-actions bot commented Nov 12, 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)

Copy link

github-actions bot commented Nov 12, 2024

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

@ibz ibz marked this pull request as ready for review November 12, 2024 17:13
@ibz ibz removed the request for review from prusnak November 12, 2024 17:13
@Hannsek
Copy link
Contributor

Hannsek commented Nov 12, 2024

In TS3 we don't use these crosses.

@Hannsek
Copy link
Contributor

Hannsek commented Nov 12, 2024

Is the info about the size somewhere on TT?

@ibz ibz force-pushed the ibz/20241112-cleanup branch 2 times, most recently from c726a95 to c7343ee Compare November 13, 2024 09:20
@ibz
Copy link
Contributor Author

ibz commented Nov 13, 2024

In TS3 we don't use these crosses.

Is the info about the sítě somewhere on TT?

What do you mean?

@Hannsek
Copy link
Contributor

Hannsek commented Nov 13, 2024

edit: Is the info about the size of the data somewhere on TT?
image

Regarding the crosses, we use different cancel button.
image
e.g.
image

@ibz
Copy link
Contributor Author

ibz commented Nov 13, 2024

edit: Is the info about the size of the data somewhere on TT?

Yes, it disappeared for a while, now it should be back.

Regarding the crosses, we use different cancel sign.

Good catch! I'll look into that.

@ibz ibz force-pushed the ibz/20241112-cleanup branch 2 times, most recently from a623611 to 3aef883 Compare November 13, 2024 11:19
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.

LGTM.

  • tested stake, approve, transfer, transfer with unknown token and unknown contract with model_r and mercury
    • model_r the screen with "Warning, Unknown contract. Continue only if you know what you are doing" has only "Confirm" option and a user can cancel only on the next screen but that's probably not a part of this cleanup PR.
  • notes from Hans seems to be fixed
  • have one code-wise suggestion
  • maybe @matejcik would like to take a look as well
  • not sure if we merge with the marquee broken but I guess yes, I'd be happy to start rebasing my PRs on top of this

core/src/trezor/ui/layouts/mercury/__init__.py Outdated Show resolved Hide resolved
@ibz
Copy link
Contributor Author

ibz commented Nov 14, 2024

model_r the screen with "Warning, Unknown contract. Continue only if you know what you are doing" has only "Confirm" option and a user can cancel only on the next screen but that's probably not a part of this cleanup PR.

Yes, the goal of this was to fix the warning and the confirm_blob, not to bring the UI to the level of Figma. That part is coming in another PR I am preparing.

@ibz ibz added the translations Put this label on a PR to run tests in all languages label Nov 15, 2024
core/src/trezor/ui/layouts/tt/__init__.py Outdated Show resolved Hide resolved
core/src/trezor/ui/layouts/tt/__init__.py Outdated Show resolved Hide resolved
core/src/trezor/ui/layouts/tt/__init__.py Outdated Show resolved Hide resolved
Commit c300576 introduced the
`default_cancel` parameter to `show_warning` and `confirm_blob` rather
using the already existing `flow_warning_hi_prio` which was doing the
same thing. This commit reverts all the nonsense.

[no changelog]
request_anim_frame will register a timer for RequestPaint, which will
then cause a crash. This commit fixes the crash, but makes the marquee
component not work.

[no changelog]
Commit c300576 introduced
`confirm_blob_with_optional_pagination` which proved to be unpopular and
impractical. This commit brings back the old behaviour of having the
`ask_pagination` parameter on `confirm_blob`. It also reverts back to
using the old way of paginating `confirm_blob` on model R, which the
aforementioned commit ignored and re-implemented from scratch.

[no changelog]
@ibz ibz merged commit f69a0f6 into main Nov 19, 2024
138 of 139 checks passed
@ibz ibz deleted the ibz/20241112-cleanup branch November 19, 2024 11:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
translations Put this label on a PR to run tests in all languages
Projects
Status: 🤝 Needs QA
Development

Successfully merging this pull request may close these issues.

Improve EVM contract flow
4 participants