Merge pull request #3520 from nymtech/bugfix/incorrect-client-versions

bugfix #3434
This commit is contained in:
Tommy Verrall
2023-06-14 17:23:11 +01:00
committed by GitHub
8 changed files with 25 additions and 13 deletions
+4 -4
View File
@@ -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,
+2 -2
View File
@@ -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),
}
}