-
Notifications
You must be signed in to change notification settings - Fork 85
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 tx edit
.
#1893
Add tx edit
.
#1893
Conversation
387e38f
to
d169f0a
Compare
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.
Add support for $schema
(marked you on the comments). Other than that, I think this is good to go.
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 is looking awesome 👏
@leighmcculloch @Ifropc @elizabethengelman is this good to go? |
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.
On top of other comments:
I remember we were talking about recovering from user leaving editor with invalid transaction.
Do we still plan to do it in this PR?
I also think panic needs to be fixed before this can be merged
thread 'main' panicked at cmd/soroban-cli/src/commands/tx/edit.rs:171:75:
called `Result::unwrap()` on an `Err` value: Error("trailing characters", line: 2, column: 12)
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
(On leaving editor with invalid JSON)
What
Add
tx edit
, so users can edit a transaction envelope using JSON in a configured editor (it reads theSTELLAR_EDITOR
,EDITOR
andVISUAL
env vars).tx-edit.mp4
Why
So users can have a more user friendly way of defining transactions.
Known limitations
There's no JSON autocompletion at the moment, but a future PR will add support for JSON schema's$schema
in rs-stellar-xdr, which will make autocompletion work out of the box with editors like VSCode.Support for JSON schema has been added directly to the CLI. Unfortunately, the JSON schema will be reported as invalid because rs-stellar-xdr does not add
$schema
as a valid key on each element that allowed in the transaction envelope. This is being tracked here: stellar/rs-stellar-xdr#417