mirror of
https://github.com/jwinterm/grin-wallet.git
synced 2026-11-27 01:23:58 +01:00
Deprecate HTTP(S) (#532)
* Deprecate HTTP(S) * Remove http support altogether
This commit is contained in:
@@ -27,11 +27,6 @@ args:
|
||||
short: t
|
||||
long: top_level_dir
|
||||
takes_value: true
|
||||
- external:
|
||||
help: Listen on 0.0.0.0 interface to allow external connections (default is 127.0.0.1)
|
||||
short: e
|
||||
long: external
|
||||
takes_value: false
|
||||
- show_spent:
|
||||
help: Show spent outputs on wallet output commands
|
||||
short: s
|
||||
|
||||
@@ -219,39 +219,6 @@ fn prompt_pay_invoice(slate: &Slate, dest: &str) -> Result<bool, ParseError> {
|
||||
}
|
||||
}
|
||||
|
||||
fn prompt_deprecate_http() -> Result<bool, ParseError> {
|
||||
let interface = Arc::new(Interface::new("http")?);
|
||||
interface.set_report_signal(Signal::Interrupt, true);
|
||||
interface.set_prompt("To proceed, type 'UNDERSTOOD' > ")?;
|
||||
println!();
|
||||
println!("Http(s) is being deprecated in favour of the Slatepack Workflow");
|
||||
println!("This sending method is planned for removal as of the last scheduled Hardfork in Grin 5.0.0");
|
||||
println!("Please see https://github.com/mimblewimble/grin-rfcs/pull/55 for details");
|
||||
loop {
|
||||
let res = interface.read_line()?;
|
||||
match res {
|
||||
ReadResult::Eof => return Ok(false),
|
||||
ReadResult::Signal(sig) => {
|
||||
if sig == Signal::Interrupt {
|
||||
interface.cancel_read_line()?;
|
||||
return Err(ParseError::CancelledError);
|
||||
}
|
||||
}
|
||||
ReadResult::Input(line) => match line.trim() {
|
||||
"Q" | "q" => return Err(ParseError::CancelledError),
|
||||
result => {
|
||||
if result == "UNDERSTOOD" {
|
||||
return Ok(true);
|
||||
} else {
|
||||
println!("Please enter the phrase 'UNDERSTOOD' (without quotes) to continue or Q to quit");
|
||||
println!();
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// instantiate wallet (needed by most functions)
|
||||
|
||||
pub fn inst_wallet<L, C, K>(
|
||||
@@ -487,10 +454,6 @@ pub fn parse_send_args(args: &ArgMatches) -> Result<command::SendArgs, ParseErro
|
||||
None => "default",
|
||||
};
|
||||
|
||||
if dest.to_uppercase().starts_with("HTTP") {
|
||||
prompt_deprecate_http()?;
|
||||
}
|
||||
|
||||
// change_outputs
|
||||
let change_outputs = parse_required(args, "change_outputs")?;
|
||||
let change_outputs = parse_u64(change_outputs, "change_outputs")? as usize;
|
||||
@@ -962,10 +925,6 @@ where
|
||||
>,
|
||||
),
|
||||
{
|
||||
if wallet_args.is_present("external") {
|
||||
wallet_config.api_listen_interface = "0.0.0.0".to_string();
|
||||
}
|
||||
|
||||
if let Some(dir) = wallet_args.value_of("top_level_dir") {
|
||||
wallet_config.data_file_dir = dir.to_string().clone();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user