Closed Dominik1999 closed 4 months ago
We can start by only telling the user the financial implications of his actions. We might need to add more or even custom information to the prompt in the future.
I would probably display the full info - i.e., print out the full account delta. Would not be as user-friendly as printing out more contextual messages - but I think for the purposes of the CLI this is fine.
One note: there are two ways to implement this functionality:
The first approach is simpler - we basically just need to add the code to print out account delta and read the confirmation from the user. But it has one major drawback: the user signs the transaction before they see the impact - so, we are kind of trusting the CLI to do the right thing here and not to send the fully-ready transaction to the node without the confirmation.
So, I think the second approach better, but it would require an authenticator integrated into the transaction host (similar to what is described in https://github.com/0xPolygonMiden/miden-base/issues/594).
But we can still implement the simpler approach first and then migrate to the authenticator once that's implemented in miden-base
.
for now I'll go with the simpler approach. Is it reasonable to add a flag to the tx new
command to proceed without asking for input?
Yeah, I think a --force
should be included.
Yeah - I think that's fine. We'll need to think how this flag will be handled in the longer-term approach - but I think we'll find ways to deal with it.
Authenticator
. Should we close this issue and open a new one or we keep working referencing this one?I'd create a new issue.
Feature description
I as a user would want to be informed about the effect of a transaction before I prove or submit the transaction. I could then confirm and the transaction is being executed and proven.
As an example in the CLI:
then the user would be prompted
Then the user can type
Y
orN
.We can start by only telling the user the financial implications of his actions. We might need to add more or even custom information to the prompt in the future.
Why is this feature needed?
We want to be more user-friendly.
This can actually be a good first issue.