Skip to content

Commit

Permalink
fix(wallet): use network specified by cli/envvar in console wallet (#…
Browse files Browse the repository at this point in the history
…4096)

Description
---
Use network specified by `--network` cli / `TARI_NETWORK` envvar in console wallet

Motivation and Context
---
The network in wallet config uses `mainnet` by default and is not overridden by the cli / env var. This PR fixes that.

How Has This Been Tested?
---
Tested by running a console wallet without a network set in the config (default mainnet) and then passing `--network dibbler`
  • Loading branch information
sdbondi committed May 16, 2022
1 parent 34fd58a commit 7f2252a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion applications/tari_console_wallet/src/main.rs
Expand Up @@ -100,8 +100,8 @@ fn main_inner() -> Result<(), ExitError> {
include_str!("../log4rs_sample.yml"),
)?;

#[cfg_attr(not(all(unix, feature = "libtor")), allow(unused_mut))]
let mut config = ApplicationConfig::load_from(&cfg)?;
config.wallet.network = cli.network.parse()?;

let runtime = tokio::runtime::Builder::new_multi_thread()
.enable_all()
Expand Down

0 comments on commit 7f2252a

Please sign in to comment.