Fixed passing config to create_config function, some more test needed before pulling to main

This commit is contained in:
Anynomouss
2025-03-01 13:28:41 +01:00
parent 0c5bdde4e8
commit 7b1144e4ec
4 changed files with 70 additions and 48 deletions
+11 -7
View File
@@ -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,