Skip to content

Commit

Permalink
Use latest version instead of unknown for auth when in doubt (#1779)
Browse files Browse the repository at this point in the history
  • Loading branch information
neacsu authored Dec 11, 2024
1 parent 0777c36 commit 2a51f1e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion nym-vpn-core/crates/nym-authenticator-client/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -753,6 +753,10 @@ pub enum AuthenticatorVersion {
UNKNOWN,
}

impl AuthenticatorVersion {
pub const LATEST: AuthenticatorVersion = AuthenticatorVersion::V4;
}

impl From<u8> for AuthenticatorVersion {
fn from(value: u8) -> Self {
if value == 2 {
Expand Down Expand Up @@ -803,7 +807,7 @@ impl From<semver::Version> for AuthenticatorVersion {
if semver.minor >= 1 {
return Self::V4;
}
Self::UNKNOWN
Self::LATEST
}
}

Expand Down

0 comments on commit 2a51f1e

Please sign in to comment.