Skip to content

Commit

Permalink
update verifier gateway info match
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffgrunewald committed Dec 14, 2023
1 parent ed8cd21 commit c24422f
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions mobile_verifier/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,17 @@ impl GatewayResolver for mobile_config::GatewayClient {
address: &helium_crypto::PublicKeyBinary,
) -> Result<GatewayResolution, Self::Error> {
use mobile_config::client::gateway_client::GatewayInfoResolver;
use mobile_config::gateway_info::GatewayInfo;
use mobile_config::gateway_info::{GatewayInfo, GatewayMetadata};
match self.resolve_gateway_info(address).await? {
None => Ok(GatewayResolution::GatewayNotFound),
Some(GatewayInfo {
metadata: Some(metadata),
metadata:
GatewayMetadata {
location: Some(location),
..
},
..
}) => Ok(GatewayResolution::AssertedLocation(metadata.location)),
}) => Ok(GatewayResolution::AssertedLocation(location)),
Some(_) => Ok(GatewayResolution::GatewayNotAsserted),
}
}
Expand Down

0 comments on commit c24422f

Please sign in to comment.