Skip to content

Commit

Permalink
Merge pull request #89 from Holo-Host/v3config
Browse files Browse the repository at this point in the history
Updated for V3 config support
  • Loading branch information
mattgeddes authored Aug 21, 2024
2 parents 135bf80 + d49e782 commit 75f4dc2
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 8 deletions.
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ holochain_types = "0.3.2"

[dependencies.hpos-config-core]
git = "https://github.com/Holo-Host/hpos-config"
rev = "6125ac11e83c618746d181faceb4ec5f981bce9f"
rev = "86411bdaabe7061a4b150d36c062fddc2c6c74cc"

[dependencies.hpos-config-seed-bundle-explorer]
git = "https://github.com/Holo-Host/hpos-config"
rev = "6125ac11e83c618746d181faceb4ec5f981bce9f"
rev = "86411bdaabe7061a4b150d36c062fddc2c6c74cc"
12 changes: 8 additions & 4 deletions client/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ struct ZTPayload {

async fn try_zerotier_auth(config: &Config, holochain_public_key: VerifyingKey) -> Fallible<()> {
match config {
Config::V2 { settings, .. } => {
Config::V3 { settings, .. } | Config::V2 { settings, .. } => {
let zerotier_identity = Identity::read_default()?;

let data = ZTData {
Expand Down Expand Up @@ -210,7 +210,12 @@ async fn try_registration_auth(
holochain_public_key: VerifyingKey,
) -> Fallible<()> {
match config {
Config::V2 {
Config::V3 {
registration_code,
settings,
..
}
| Config::V2 {
registration_code,
settings,
..
Expand Down Expand Up @@ -245,8 +250,7 @@ async fn try_registration_auth(
}
}
}
// todo: update to use v3 soon
Config::V3 { settings, .. } | Config::V1 { settings, .. } => {
Config::V1 { settings, .. } => {
send_failure_email(
settings.admin.email.clone(),
AuthError::ConfigVersionError.to_string(),
Expand Down

0 comments on commit 75f4dc2

Please sign in to comment.