mirror of
https://github.com/jwinterm/grin-wallet.git
synced 2026-10-23 10:08:33 +02:00
use local chain_type and global chain_type as necessary
This commit is contained in:
@@ -141,7 +141,7 @@ fn real_main() -> i32 {
|
||||
|
||||
log_build_info();
|
||||
|
||||
global::set_mining_mode(
|
||||
global::init_global_chain_type(
|
||||
config
|
||||
.members
|
||||
.as_ref()
|
||||
|
||||
@@ -32,7 +32,6 @@ use grin_wallet_libwallet::Slate;
|
||||
use grin_wallet_libwallet::{IssueInvoiceTxArgs, NodeClient, WalletInst, WalletLCProvider};
|
||||
use grin_wallet_util::grin_core as core;
|
||||
use grin_wallet_util::grin_core::core::amount_to_hr_string;
|
||||
use grin_wallet_util::grin_core::global;
|
||||
use grin_wallet_util::grin_keychain as keychain;
|
||||
use grin_wallet_util::OnionV3Address;
|
||||
use linefeed::terminal::Signal;
|
||||
@@ -275,18 +274,9 @@ pub fn parse_global_args(
|
||||
}
|
||||
};
|
||||
|
||||
let chain_type = match config.chain_type.clone() {
|
||||
None => {
|
||||
let param_ref = global::CHAIN_TYPE.read();
|
||||
param_ref.clone()
|
||||
}
|
||||
Some(c) => c,
|
||||
};
|
||||
|
||||
Ok(command::GlobalArgs {
|
||||
account: account.to_owned(),
|
||||
show_spent: show_spent,
|
||||
chain_type: chain_type,
|
||||
api_secret: api_secret,
|
||||
node_api_secret: node_api_secret,
|
||||
password: password,
|
||||
@@ -843,10 +833,6 @@ where
|
||||
>,
|
||||
),
|
||||
{
|
||||
if let Some(t) = wallet_config.chain_type.clone() {
|
||||
core::global::set_mining_mode(t);
|
||||
}
|
||||
|
||||
if wallet_args.is_present("external") {
|
||||
wallet_config.api_listen_interface = "0.0.0.0".to_string();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user