Fixed passing config to create_config function, some more test needed before pulling to main
This commit is contained in:
@@ -16,8 +16,8 @@
|
||||
|
||||
use crate::api::TLSConfig;
|
||||
use crate::apiwallet::{try_slatepack_sync_workflow, Owner};
|
||||
use crate::config::{TorConfig, WalletConfig};
|
||||
use crate::core::core;
|
||||
use crate::config::{TorConfig, WalletConfig, WALLET_CONFIG_FILE_NAME};
|
||||
use crate::core::{core, global};
|
||||
use crate::error::Error;
|
||||
use crate::impls::PathToSlatepack;
|
||||
use crate::impls::SlateGetter as _;
|
||||
@@ -82,13 +82,17 @@ where
|
||||
K: keychain::Keychain + 'static,
|
||||
{
|
||||
// Assume global chain type has already been initialized.
|
||||
let chain_type = global::get_chain_type();
|
||||
|
||||
let mut w_lock = owner_api.wallet_inst.lock();
|
||||
let p = w_lock.lc_provider()?;
|
||||
// Config creation was moved to main, only create new if config is ot in arguments
|
||||
// let chain_type = global::get_chain_type();
|
||||
// args.config, config: &WalletConfig) {
|
||||
// p.create_config(&chain_type, WALLET_CONFIG_FILE_NAME, None, None, None)?;
|
||||
// }
|
||||
p.create_config(
|
||||
&chain_type,
|
||||
WALLET_CONFIG_FILE_NAME,
|
||||
Some(args.config),
|
||||
None,
|
||||
None,
|
||||
)?;
|
||||
p.create_wallet(
|
||||
None,
|
||||
args.recovery_phrase,
|
||||
|
||||
Reference in New Issue
Block a user