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

Add a confirmation displaying the cost of transaction to the CLI #3653

Closed
4 tasks
gamarin2 opened this issue Feb 14, 2019 · 6 comments · Fixed by #3698
Closed
4 tasks

Add a confirmation displaying the cost of transaction to the CLI #3653

gamarin2 opened this issue Feb 14, 2019 · 6 comments · Fixed by #3698

Comments

@gamarin2
Copy link
Contributor

Summary

When you create a transaction, before you input your password you need to be prompted with the amount of Atoms this transaction will cost. Something like:

"This transaction will cost you 10 Atoms in transaction fees. Are you sure you want to proceed? Y\n"

Problem Definition

  • Gas is hard to understand.
  • A typo in Gas Prices can happen. Because fees = gas * gas-prices, a typo can end up in ten times more fees than expected.

Proposal


For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned
@alessio
Copy link
Contributor

alessio commented Feb 16, 2019

Although I think you've got a point in asking to show users the gas price they are going to agree to pay for the tx, I have mixed feelings about turning this sort of interactive mode on by default, considering that we have a specific flag to only simulate the transaction and display an estimate of the gas price (--dry-run).

@alessio
Copy link
Contributor

alessio commented Feb 16, 2019

Thoughts @cosmos/cosmossdk ?

@rigelrozanski
Copy link
Contributor

I think it would also be okay to have this feature (which really only adds security) enabled by default so long as it could be easily turned off with --fast flag or something

@cwgoes
Copy link
Contributor

cwgoes commented Feb 16, 2019

I think confirming sends by default is fine, but we should have a --fast or -y / --yes flag.

@alessio
Copy link
Contributor

alessio commented Feb 17, 2019

👍 to the -y/--yes flag

@alexanderbez
Copy link
Contributor

alexanderbez commented Feb 26, 2019

fret not @gamarin2, even though #3698 was merged, we can now simply add a new print statement in the prompt stating the converted fee. I stated it ties into #3510 now because we need this conversion functionality and denom mapping -- it can be simple for now (e.g. ToAtoms(20000000, "uatom"), FromAtoms(2, "uatom"))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants