mirror of
https://github.com/comit-network/xmr-btc-swap.git
synced 2025-09-25 19:01:02 -04:00
Be smart about how we import Config
By saying env::Config, we can save a line of code in the imports and make it clearer, what kind of `Config` this is.
This commit is contained in:
parent
be5bf01ed4
commit
7adeaae12d
1 changed files with 4 additions and 5 deletions
|
@ -1,6 +1,5 @@
|
||||||
use crate::database::Database;
|
use crate::database::Database;
|
||||||
use crate::env::Config;
|
use crate::{bitcoin, env, monero};
|
||||||
use crate::{bitcoin, monero};
|
|
||||||
use anyhow::Result;
|
use anyhow::Result;
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
use uuid::Uuid;
|
use uuid::Uuid;
|
||||||
|
@ -26,7 +25,7 @@ pub struct Swap {
|
||||||
pub db: Database,
|
pub db: Database,
|
||||||
pub bitcoin_wallet: Arc<bitcoin::Wallet>,
|
pub bitcoin_wallet: Arc<bitcoin::Wallet>,
|
||||||
pub monero_wallet: Arc<monero::Wallet>,
|
pub monero_wallet: Arc<monero::Wallet>,
|
||||||
pub env_config: Config,
|
pub env_config: env::Config,
|
||||||
pub swap_id: Uuid,
|
pub swap_id: Uuid,
|
||||||
pub receive_monero_address: monero::Address,
|
pub receive_monero_address: monero::Address,
|
||||||
}
|
}
|
||||||
|
@ -39,7 +38,7 @@ pub struct Builder {
|
||||||
monero_wallet: Arc<monero::Wallet>,
|
monero_wallet: Arc<monero::Wallet>,
|
||||||
|
|
||||||
init_params: InitParams,
|
init_params: InitParams,
|
||||||
env_config: Config,
|
env_config: env::Config,
|
||||||
|
|
||||||
event_loop_handle: EventLoopHandle,
|
event_loop_handle: EventLoopHandle,
|
||||||
|
|
||||||
|
@ -58,7 +57,7 @@ impl Builder {
|
||||||
swap_id: Uuid,
|
swap_id: Uuid,
|
||||||
bitcoin_wallet: Arc<bitcoin::Wallet>,
|
bitcoin_wallet: Arc<bitcoin::Wallet>,
|
||||||
monero_wallet: Arc<monero::Wallet>,
|
monero_wallet: Arc<monero::Wallet>,
|
||||||
env_config: Config,
|
env_config: env::Config,
|
||||||
event_loop_handle: EventLoopHandle,
|
event_loop_handle: EventLoopHandle,
|
||||||
receive_monero_address: monero::Address,
|
receive_monero_address: monero::Address,
|
||||||
) -> Self {
|
) -> Self {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue