-
Notifications
You must be signed in to change notification settings - Fork 1
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
Feat/sign with lab #25
Conversation
65086b4
to
800e802
Compare
|
||
let txn_sign_url = url.to_string(); | ||
|
||
println!("Opening lab to sign transaction: {}", &txn_sign_url); |
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.
We have --yes
flag that we can use here.
I think we should add a prompt like "Lab link would be opened in the browser, do you want to continue? [Y/n]"
And if --yes
passed, this prompt should be skipped
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 makes sense to me!
I'm having trouble implementing it, and could use another set of eyes. The issue is that when I am piping my tx xdr into the cli, the program seems to lose track of the stdin reader when it gets to trying to read the user's y
response.
I.e. when I pass in this command:
echo AAAAAgAAAADcOHnq5sGLOngOCEMyLqqn5CvFV2HGbOSjJAIzhqBdkAAAAGQAEb7UAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAYAAAAAQAAAAAAAAAAAAAAANw4eermwYs6eA4IQzIuqqfkK8VXYcZs5KMkAjOGoF2Q04SY/PMseMCgfbEFkX5gTr9qD/d0mvD9H3acFOz/X5oAAAAALtGgcgsAibk5q8VOLY2R1G1NdGX7fLzlz7iBFBy64JIAAAAAAAAAAAAAAAA= \
| cargo run tx sign --network testnet --sign-with-lab
I see this issue:
thread 'main' panicked at cmd/soroban-cli/src/config/sign_with.rs:150:41:
called `Result::unwrap()` on an `Err` value: Custom { kind: Other, error: "Failed to initialize input reader" }
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
It opens lab as expected with --yes
.
)] | ||
pub sign_with_lab: bool, | ||
pub lab_url: String, |
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.
Should it also be conflicts_with = "sign_with_key"
?
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.
Good call! I'll push up a change shortly
Co-authored-by: Willem Wyndham <[email protected]>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
abb0db6
to
b6a1878
Compare
closing this in favor of stellar#1604 |
What
[TODO: Short statement about what is changing.]
Why
[TODO: Why this change is being made. Include any context required to understand the why.]
Known limitations
[TODO or N/A]