Merge pull request #3520 from nymtech/bugfix/incorrect-client-versions
bugfix #3434
This commit is contained in:
@@ -75,7 +75,7 @@ impl NymConfigTemplate for Config {
|
||||
impl Config {
|
||||
pub fn new<S: AsRef<str>>(id: S) -> Self {
|
||||
Config {
|
||||
base: BaseClientConfig::new(id.as_ref()),
|
||||
base: BaseClientConfig::new(id.as_ref(), env!("CARGO_PKG_VERSION")),
|
||||
storage_paths: ClientPaths::new_default(default_data_directory(id.as_ref())),
|
||||
logging: Default::default(),
|
||||
socket: Default::default(),
|
||||
|
||||
@@ -70,7 +70,11 @@ impl NymConfigTemplate for Config {
|
||||
impl Config {
|
||||
pub fn new<S: AsRef<str>>(id: S, provider_mix_address: S) -> Self {
|
||||
Config {
|
||||
core: CoreConfig::new(id.as_ref(), provider_mix_address.as_ref()),
|
||||
core: CoreConfig::new(
|
||||
id.as_ref(),
|
||||
env!("CARGO_PKG_VERSION"),
|
||||
provider_mix_address.as_ref(),
|
||||
),
|
||||
storage_paths: SocksClientPaths::new_default(default_data_directory(id.as_ref())),
|
||||
logging: Default::default(),
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ impl Config {
|
||||
#[wasm_bindgen(constructor)]
|
||||
pub fn new(id: String, validator_server: String, debug: Option<DebugWasm>) -> Self {
|
||||
Config {
|
||||
base: BaseClientConfig::new(id)
|
||||
base: BaseClientConfig::new(id, env!("CARGO_PKG_VERSION").to_string())
|
||||
.with_custom_nyxd(vec![validator_server
|
||||
.parse()
|
||||
.expect("provided url was malformed")])
|
||||
@@ -39,7 +39,7 @@ impl Config {
|
||||
|
||||
pub(crate) fn new_tester_config<S: Into<String>>(id: S) -> Self {
|
||||
Config {
|
||||
base: BaseClientConfig::new(id)
|
||||
base: BaseClientConfig::new(id.into(), env!("CARGO_PKG_VERSION").to_string())
|
||||
.with_disabled_credentials(true)
|
||||
.with_disabled_cover_traffic(true)
|
||||
.with_disabled_topology_refresh(true),
|
||||
|
||||
@@ -66,9 +66,9 @@ pub struct Config {
|
||||
}
|
||||
|
||||
impl Config {
|
||||
pub fn new<S: Into<String>>(id: S) -> Self {
|
||||
pub fn new<S: Into<String>>(id: S, version: S) -> Self {
|
||||
Config {
|
||||
client: Client::new_default(id),
|
||||
client: Client::new_default(id, version),
|
||||
debug: Default::default(),
|
||||
}
|
||||
}
|
||||
@@ -243,7 +243,7 @@ pub struct Client {
|
||||
}
|
||||
|
||||
impl Client {
|
||||
pub fn new_default<S: Into<String>>(id: S) -> Self {
|
||||
pub fn new_default<S: Into<String>>(id: S, version: S) -> Self {
|
||||
let network = NymNetworkDetails::new_mainnet();
|
||||
let nyxd_urls = network
|
||||
.endpoints
|
||||
@@ -257,7 +257,7 @@ impl Client {
|
||||
.collect::<Vec<_>>();
|
||||
|
||||
Client {
|
||||
version: env!("CARGO_PKG_VERSION").to_string(),
|
||||
version: version.into(),
|
||||
id: id.into(),
|
||||
disabled_credentials_mode: true,
|
||||
nyxd_urls,
|
||||
|
||||
@@ -27,9 +27,9 @@ pub struct Config {
|
||||
}
|
||||
|
||||
impl Config {
|
||||
pub fn new<S: Into<String>>(id: S, provider_mix_address: S) -> Self {
|
||||
pub fn new<S: Into<String>>(id: S, version: S, provider_mix_address: S) -> Self {
|
||||
Config {
|
||||
base: BaseClientConfig::new(id),
|
||||
base: BaseClientConfig::new(id, version),
|
||||
socks5: Socks5::new(provider_mix_address),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -73,7 +73,11 @@ pub fn socks5_config_id_appended_with(gateway_id: &str) -> String {
|
||||
impl Config {
|
||||
pub fn new<S: AsRef<str>>(id: S, provider_mix_address: S) -> Self {
|
||||
Config {
|
||||
core: Socks5CoreConfig::new(id.as_ref(), provider_mix_address.as_ref()),
|
||||
core: Socks5CoreConfig::new(
|
||||
id.as_ref(),
|
||||
env!("CARGO_PKG_VERSION"),
|
||||
provider_mix_address.as_ref(),
|
||||
),
|
||||
storage_paths: NymConnectPaths::new_default(default_data_directory(id.as_ref())),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -67,7 +67,11 @@ impl Config {
|
||||
S: AsRef<str>,
|
||||
{
|
||||
Config {
|
||||
core: CoreConfig::new(id.as_ref(), provider_mix_address.as_ref()),
|
||||
core: CoreConfig::new(
|
||||
id.as_ref(),
|
||||
env!("CARGO_PKG_VERSION"),
|
||||
provider_mix_address.as_ref(),
|
||||
),
|
||||
storage_paths: storage_root.map(|storage_root| {
|
||||
MobileSocksClientPaths::new_default(data_directory_from_root(
|
||||
storage_root,
|
||||
|
||||
@@ -82,7 +82,7 @@ impl NymConfigTemplate for Config {
|
||||
impl Config {
|
||||
pub fn new<S: AsRef<str>>(id: S) -> Self {
|
||||
Config {
|
||||
base: BaseClientConfig::new(id.as_ref()),
|
||||
base: BaseClientConfig::new(id.as_ref(), env!("CARGO_PKG_VERSION")),
|
||||
network_requester: Default::default(),
|
||||
storage_paths: NetworkRequesterPaths::new_default(default_data_directory(id.as_ref())),
|
||||
network_requester_debug: Default::default(),
|
||||
|
||||
Reference in New Issue
Block a user