mirror of
https://github.com/Cyrix126/gupaxx.git
synced 2024-12-22 14:49:21 +00:00
fix: custom command arguments not parsed correctly node and proxy tab
This commit is contained in:
parent
80db6bbacc
commit
9241b573a0
2 changed files with 14 additions and 6 deletions
|
@ -56,9 +56,13 @@ impl Helper {
|
||||||
}
|
}
|
||||||
pub fn build_node_args(state: &crate::disk::state::Node) -> Vec<String> {
|
pub fn build_node_args(state: &crate::disk::state::Node) -> Vec<String> {
|
||||||
let mut args = Vec::with_capacity(500);
|
let mut args = Vec::with_capacity(500);
|
||||||
if !state.arguments.is_empty() {
|
if !state.arguments.is_empty() && !state.simple {
|
||||||
args.push(state.arguments.clone());
|
// This parses the input
|
||||||
return args;
|
// todo: set the state if user change port and token
|
||||||
|
for arg in state.arguments.split_whitespace() {
|
||||||
|
let arg = if arg == "localhost" { "127.0.0.1" } else { arg };
|
||||||
|
args.push(arg.to_string());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// [Simple]
|
// [Simple]
|
||||||
|
|
|
@ -114,8 +114,12 @@ impl Helper {
|
||||||
let port;
|
let port;
|
||||||
// custom args from user input
|
// custom args from user input
|
||||||
if !state.arguments.is_empty() && !state.simple {
|
if !state.arguments.is_empty() && !state.simple {
|
||||||
args.push(state.arguments.clone());
|
// This parses the input
|
||||||
return args;
|
// todo: set the state if user change port and token
|
||||||
|
for arg in state.arguments.split_whitespace() {
|
||||||
|
let arg = if arg == "localhost" { "127.0.0.1" } else { arg };
|
||||||
|
args.push(arg.to_string());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// [Simple]
|
// [Simple]
|
||||||
if state.simple {
|
if state.simple {
|
||||||
|
@ -529,7 +533,7 @@ impl PubXmrigProxyApi {
|
||||||
*gui_api = Self {
|
*gui_api = Self {
|
||||||
output,
|
output,
|
||||||
node,
|
node,
|
||||||
..std::mem::take(pub_api)
|
..pub_api.clone()
|
||||||
};
|
};
|
||||||
if !buf.is_empty() {
|
if !buf.is_empty() {
|
||||||
gui_api.output.push_str(&buf);
|
gui_api.output.push_str(&buf);
|
||||||
|
|
Loading…
Reference in a new issue