Rename ExecutionParams to EnvironmentConfig

This commit is contained in:
Thomas Eizinger 2021-03-17 14:55:42 +11:00
parent bc43ed6ebd
commit 09c41f89c4
No known key found for this signature in database
GPG key ID: 651AC83A6C6C8B96
14 changed files with 132 additions and 136 deletions

View file

@ -1,4 +1,4 @@
use crate::execution_params::ExecutionParams;
use crate::env::Config;
use crate::monero::{
Amount, InsufficientFunds, PrivateViewKey, PublicViewKey, TransferProof, TxHash,
};
@ -24,20 +24,16 @@ pub struct Wallet {
}
impl Wallet {
pub fn new(url: Url, name: String, exec_params: ExecutionParams) -> Self {
Self::new_with_client(Client::new(url), name, exec_params)
pub fn new(url: Url, name: String, env_config: Config) -> Self {
Self::new_with_client(Client::new(url), name, env_config)
}
pub fn new_with_client(
client: wallet::Client,
name: String,
exec_params: ExecutionParams,
) -> Self {
pub fn new_with_client(client: wallet::Client, name: String, env_config: Config) -> Self {
Self {
inner: Mutex::new(client),
network: exec_params.monero_network,
network: env_config.monero_network,
name,
avg_block_time: exec_params.monero_avg_block_time,
avg_block_time: env_config.monero_avg_block_time,
}
}