Fix wallet output for old config (#1919)

Wallet output operations expect now color scheme be defined in the
configuration file. This fix makes it works for old configuration files.
This commit is contained in:
hashmap 2018-11-05 00:58:10 +01:00 committed by Gary Yu
parent 53bce41981
commit 04438347ad

View file

@ -435,7 +435,7 @@ pub fn wallet_command(wallet_args: &ArgMatches, config: GlobalWalletConfig) -> i
account,
&wallet_info,
validated,
wallet_config.dark_background_color_scheme.unwrap(),
wallet_config.dark_background_color_scheme.unwrap_or(true),
);
Ok(())
}
@ -447,7 +447,7 @@ pub fn wallet_command(wallet_args: &ArgMatches, config: GlobalWalletConfig) -> i
height,
validated,
outputs,
wallet_config.dark_background_color_scheme.unwrap(),
wallet_config.dark_background_color_scheme.unwrap_or(true),
).map_err(|e| {
ErrorKind::GenericError(format!(
"Error getting wallet outputs: {:?} Config: {:?}",
@ -477,7 +477,7 @@ pub fn wallet_command(wallet_args: &ArgMatches, config: GlobalWalletConfig) -> i
validated,
txs,
include_status,
wallet_config.dark_background_color_scheme.unwrap(),
wallet_config.dark_background_color_scheme.unwrap_or(true),
).map_err(|e| {
ErrorKind::GenericError(format!(
"Error getting wallet outputs: {} Config: {:?}",
@ -493,7 +493,7 @@ pub fn wallet_command(wallet_args: &ArgMatches, config: GlobalWalletConfig) -> i
height,
validated,
outputs,
wallet_config.dark_background_color_scheme.unwrap(),
wallet_config.dark_background_color_scheme.unwrap_or(true),
).map_err(|e| {
ErrorKind::GenericError(format!(
"Error getting wallet outputs: {} Config: {:?}",