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

optionally retries in cli commands if user rejects Ledger request #5672

Merged
merged 2 commits into from
Nov 27, 2024

Conversation

hughy
Copy link
Contributor

@hughy hughy commented Nov 25, 2024

Summary

if a user rejects an action on their Ledger, the command will now exit ask the user to retry instead of automatically retrying and prompting the user again to approve the action

Testing Plan

before:
image

after:
image

Documentation

Does this change require any updates to the Iron Fish Docs (ex. the RPC API
Reference
)? If yes, link a
related documentation pull request for the website.

[ ] Yes

Breaking Change

Is this a breaking change? If yes, add notes below on why this is breaking and label it with breaking-change-rpc or breaking-change-sdk.

[ ] Yes

@hughy hughy requested a review from a team as a code owner November 25, 2024 22:36
@NullSoldier
Copy link
Contributor

I'm fine with this, but the reason we decided to retry is in case the user accidentally hits deny instead of accept and the pain of starting the process all over from scratch because someone accidentally rejected is a pretty painful UX experience. That being said, if you think this is a better UX I'm ok with it.

@hughy
Copy link
Contributor Author

hughy commented Nov 26, 2024

I'm fine with this, but the reason we decided to retry is in case the user accidentally hits deny instead of accept and the pain of starting the process all over from scratch because someone accidentally rejected is a pretty painful UX experience. That being said, if you think this is a better UX I'm ok with it.

I think a compromise here may be to prompt the user to retry instead of retrying automatically. That protects against accidentally rejecting a request, but avoids unexpected behavior if the user intentionally rejects the request.

@hughy hughy changed the title exits cli commands if user rejects Ledger request optionally retries in cli commands if user rejects Ledger request Nov 26, 2024
if a user rejects an action on their Ledger, the command will now exit instead
of retrying and prompting the user again to approve the action
providers users a way to retry if they rejected by accident because starting
over in that case is a very bad experience

refactors retry prompt into reusable function
@hughy hughy force-pushed the feat/hughy/ledger-reject-exit branch from 00c4244 to eba6449 Compare November 26, 2024 20:44
Copy link
Contributor

@NullSoldier NullSoldier left a comment

Choose a reason for hiding this comment

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

Tested this manually, it works really well. Also it reduces a lot of duplicated code.

@NullSoldier NullSoldier merged commit b9bb244 into staging Nov 27, 2024
12 checks passed
@NullSoldier NullSoldier deleted the feat/hughy/ledger-reject-exit branch November 27, 2024 01:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants