mirror of
https://github.com/mimblewimble/grin.git
synced 2025-01-21 03:21:08 +03:00
parent
900c52424d
commit
b61c0607c2
2 changed files with 5 additions and 7 deletions
|
@ -282,13 +282,11 @@ fn wallet_command(wallet_args: &ArgMatches) {
|
|||
"Error deriving extended key from seed.",
|
||||
);
|
||||
|
||||
let default_ip = "127.0.0.1";
|
||||
let mut addr = format!("{}:13416", default_ip);
|
||||
|
||||
let mut wallet_config = WalletConfig::default();
|
||||
if let Some(port) = wallet_args.value_of("port") {
|
||||
addr = format!("{}:{}", default_ip, port);
|
||||
wallet_config.api_http_addr = format!("http://{}", addr).to_string();
|
||||
let default_ip = "127.0.0.1";
|
||||
wallet_config.api_http_addr = format!("{}:{}", default_ip, port);
|
||||
}
|
||||
|
||||
if let Some(dir) = wallet_args.value_of("dir") {
|
||||
|
@ -319,10 +317,10 @@ fn wallet_command(wallet_args: &ArgMatches) {
|
|||
"/receive".to_string(),
|
||||
wallet::WalletReceiver {
|
||||
key: key,
|
||||
config: wallet_config,
|
||||
config: wallet_config.clone(),
|
||||
},
|
||||
);
|
||||
apis.start(addr).unwrap_or_else(|e| {
|
||||
apis.start(wallet_config.api_http_addr).unwrap_or_else(|e| {
|
||||
error!("Failed to start Grin wallet receiver: {}.", e);
|
||||
});
|
||||
}
|
||||
|
|
|
@ -93,7 +93,7 @@ impl Default for WalletConfig {
|
|||
fn default() -> WalletConfig {
|
||||
WalletConfig {
|
||||
enable_wallet: false,
|
||||
api_http_addr: "http://127.0.0.1:13415".to_string(),
|
||||
api_http_addr: "127.0.0.1:13416".to_string(),
|
||||
check_node_api_http_addr: "http://127.0.0.1:13415".to_string(),
|
||||
data_file_dir: ".".to_string(),
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue