-
-
Notifications
You must be signed in to change notification settings - Fork 710
refactor(core): improved Stellar transaction signing interface for a more streamlined user experience. #5159
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
Conversation
cc1fbd7
to
ccf56b4
Compare
A Few Questions
Hi @matejcik, could you please help me with this? I haven't contributed code here for a long time. |
cc @obrusvit |
you need to add English strings. you can ignore the other languages
nobody does that manually. |
3a2f559
to
fe44259
Compare
br_name or "confirm_address", | ||
br_code, | ||
subtitle=None, | ||
subtitle=subtitle, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've made some adjustments to meet Stellar's requirements, but this has impacted certain interfaces for Ethereum and Solana.
Ethereum before and after:
I'm not sure why we're not consistent with delizia's implementation here, especially since the subtitle
isn't ignored there.
trezor-firmware/core/src/trezor/ui/layouts/delizia/__init__.py
Lines 635 to 655 in 5194e1e
def confirm_address( | |
title: str, | |
address: str, | |
subtitle: str | None = None, | |
description: str | None = None, | |
verb: str | None = None, | |
warning_footer: str | None = None, | |
chunkify: bool = True, | |
br_name: str | None = None, | |
br_code: ButtonRequestType = BR_CODE_OTHER, | |
) -> Awaitable[None]: | |
return confirm_value( | |
title, | |
address, | |
description or "", | |
br_name or "confirm_address", | |
br_code, | |
subtitle=subtitle, | |
verb=(verb or TR.buttons__confirm), | |
chunkify=chunkify, | |
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is fine. Thanks for pointing this out.
71b7c59
to
d79e5c6
Compare
Hello @overcat, I rebased on top of
From the discussion in the issue, the last thing remaining in the UI is the cancellation from the warning screen, am I right? I'll take a look whether we can do it easily. Thank you. |
One more thing @overcat, do you think you could provide |
Hi @obrusvit
This should apply to all alert pages, not just Stellar's. So, would it be better to do this in a separate PR?
Here's some test data; you can find more in https://github.com/trezor/trezor-firmware/blob/main/common/tests/fixtures/stellar/sign_tx.json (check
|
I thought it is an issue only with this pr, but as you said, it is problem with all warning screens. So, let's not block this pr with this. |
d79e5c6
to
9a3dd90
Compare
Rebased on |
d9f3df5
to
231566a
Compare
699d01b
to
03e9ad0
Compare
BTW, I am taking this over so we can get unstuck. Thank you, @overcat for the great job!!! After rebasing and dealing with conflicts, I am doing a final review - including a review of the UI changes. I have to say that generally the UI looks much better than before! In some cases it feels like a slight downgrade, for example: ![]() Was replaced with: ![]() I honestly liked seeing the fact that an account is created, not just a generic Another question, for @overcat ![]() Is this really a "maximum fee" or is it an exact fee amount that we are dealing with? Since we changed the design, I would not have expected a change in the semantics... The two are not the same! But generally the UI feels more consistent and in line with other coins, so I think having this merged will be a plus. PS: I will look into the warning cancellation after this gets merged, since it is a separate issue... |
Hi @ibz, it's
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
I removed some strings that are now unused.
One thing to note is that we used to warn when using testnet
for a transaction, now we don't.
I suppose it is not a risk of losing funds, because at worst what happens is somebody sends testnet tokens without realizing they are testnet... not the other way around.
core/src/apps/stellar/layout.py
Outdated
async def require_confirm_final( | ||
address_n: list[int], | ||
fee: int, | ||
timebonuds: tuple[int, int], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Renamed to timebounds
I will squash, force push, and get it ready to be merged... |
4044a6a
to
fa964c7
Compare
Yes, this design has been clarified here. |
Right, I missed that part at the bottom about the testnet, but seems it's all clear. It was indeed an unnecessary complication for no added benefit. |
fa964c7
to
a746997
Compare
Key Changes
Recipient #{output_index}
: If a tx contains multiple payment-related operations, we will useRecipient #{output_index}
to label them.You can find the design here, though the final design has some slight differences which you can see in the follow-up discussions.