-
-
Notifications
You must be signed in to change notification settings - Fork 665
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
Cardano UI simplification for flows initiated by Suite #4256 #4284
Conversation
|
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.
pub enum ConfirmWithInfo { | ||
Main, | ||
Menu, | ||
} |
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.
Wondering what's the main difference from other two-screen flows we already have 🤔 Menu items?
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 flow has different option in the menu "Show all" and it returns INFO
on click of that button. It seemed the best way for now is to just create a new flow.
I'm thinking about a more universal constructor of these SwipeFlow
s which would be supplied with menu options and what they do... No clear idea at the moment.
To answer the top comment:
There's a Safe 3 testcase where hold-to-confirm is introduced as a second-to-last action which probably isn't right:
Then again, T3T1 also has some weirdness which is not new?
These screens show the derivation paths and they are shown after the transaction is signed and only if should_show_more is true
, i.e. when the user opted for "Show all". IIUC, Cardano TX is not initiated with derivation paths of the inputs, they are optionally provided by the host afterwards. The UX is quite strange ("Hold to confirm", then simple "Confirm") but I didn't want to change the flows not coming from Suite.
I was also perplexed at first.
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'm thinking about a more universal constructor of these SwipeFlows which would be supplied with menu options and what they do
I think main problem is making the parameters of this constructor available to the logic in handle_swipe
/handle_event
, which is currently not possible without abusing RwLock/AtomicU.*
Tested with Suite and found out that the categorization must allow fixed here: 8b5e087 |
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.
- clippy is failing
- needs regenerated fixtures incl. translations
otherwise LGTM
dc3e71a
to
a4d1846
Compare
- remove the choise of detail level ("Show simple" vs "Show all") when signing simple transactions - these are the transactions typically enabled by TrezorSuite.
This prompt was unintuitive as the menu button served as the "show more" button. This commit implements a small SwipeFlow which hides the option to the context menu.
- change the button text based on `hold` - make it abortable
a4d1846
to
1b3f4c1
Compare
Also show Recipient {i} for simple tx
Rationale: the removed test cases are considered "simple" as of the recent changes and they do not prompt a user for "level of details".
1b3f4c1
to
a390f0c
Compare
|
QA OK checked on TS5 device Info:
|
This PR aims to simplify Cardano flows initiated by Trezor Suite. Namely:
i
, recipienti
and Summary at the end. No "Choose level of details" screen.This is achieved by:
ORDINARY_SIGNER
to categorize the transaction furtherTODO:
SIMPLE_SEND
,SIMPLE_STAKE_DELEGATE
,SIMPLE_STAKE_WITHDRAW
orNOT_SUITE_TX
is generally validtotal_amount
calculation for the summary - e.g. change output should not be added to the final amount?i
showingcardano/sign_tx.json
with"simple transaction"
in the name are affectedshould_show_more = True
, shouldn't be a big deal.mercury
mercury
summary layout has a wrong button text and title