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

Remove manual prompt based signing path from forc-client #6071

Open
kayagokalp opened this issue May 29, 2024 · 0 comments
Open

Remove manual prompt based signing path from forc-client #6071

kayagokalp opened this issue May 29, 2024 · 0 comments
Labels
code quality forc-client Everything related to the `forc-client` crate.

Comments

@kayagokalp
Copy link
Member

From couple of years ago, at the time we first introduced forc-deploy, we did not have any way of signing transactions other than manual copy pasting in between multiple terminals. This was resolved with forc-wallet integration but the old path is still in the code. We should remove it as it is pretty outdated, although working probably confusing for someone new into the codebase and makes some new stuff little bit harder than it needs to be like #6069

Basically remove:

fn prompt_address() -> Result<Bech32Address> {
print!("Please provide the address of the wallet you are going to sign this transaction with:");
std::io::stdout().flush()?;
let mut buf = String::new();
std::io::stdin().read_line(&mut buf)?;
Bech32Address::from_str(buf.trim()).map_err(Error::msg)
}
fn prompt_signature(tx_id: fuel_tx::Bytes32) -> Result<Signature> {
println!("Transaction id to sign: {tx_id}");
print!("Please provide the signature:");
std::io::stdout().flush()?;
let mut buf = String::new();
std::io::stdin().read_line(&mut buf)?;
Signature::from_str(buf.trim()).map_err(Error::msg)
}

and places calling into these functions.

@kayagokalp kayagokalp added code quality forc-client Everything related to the `forc-client` crate. labels May 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code quality forc-client Everything related to the `forc-client` crate.
Projects
None yet
Development

No branches or pull requests

1 participant