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

Display (unsigned) transaction's pretty print on the terminal before signing #3134

Closed
tjanez opened this issue Jul 27, 2020 · 2 comments · Fixed by #3137
Closed

Display (unsigned) transaction's pretty print on the terminal before signing #3134

tjanez opened this issue Jul 27, 2020 · 2 comments · Fixed by #3137
Labels
c:cli Category: command line interface

Comments

@tjanez
Copy link
Member

tjanez commented Jul 27, 2020

SUMMARY

To improve UX when signing transactions with our CLI, we should display (unsigned) transaction's pretty print on the terminal before signing.

For example:

You are about to sign the following transaction:
Content:
  Nonce:  7
  Fee:    2000 (gas limit: 1000, gas price: 2)
  Method: staking.Transfer
  Body:
    To:     oasis1qr3jc2yfhszpyy0daha2l9xjlkrxnzas0uaje4t3
    Amount: 170000000000 base units
Other info:
  Genesis document's hash: 9d1b73470796e7e23f301d67047e4d4ede8ad20a37bf35f9d1b73470796e7e23

If the file signer is used, it should also ask for confirmation, unless --assume-yes (or similar) CLI flag is set, e.g.:

Are you sure you want to continue? [y/N]

If the Ledger signer plugin is used, it could display something like:

Please, follow the instructions on your Ledger device's screen...

to instruct the user to confirm and sign the transaction on his Ledger device.

ISSUE TYPE
  • Feature Idea
@tjanez tjanez added the c:cli Category: command line interface label Jul 27, 2020
@Yawning
Copy link
Contributor

Yawning commented Jul 27, 2020

Please, follow the instructions on your Ledger device's screen...

I would be against adding special cases for specific external plugins to the oasis-core codebase.

@tjanez
Copy link
Member Author

tjanez commented Jul 27, 2020

I would be against adding special cases for specific external plugins to the oasis-core codebase.

Sure, I have no strong preferences over that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c:cli Category: command line interface
Projects
None yet
2 participants