Skip to content

Commit

Permalink
fix: handle manifest without network
Browse files Browse the repository at this point in the history
  • Loading branch information
Theodus committed Jun 11, 2024
1 parent a8899b8 commit 6ec15f6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion graph-gateway/src/network/internal/pre_processing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -202,12 +202,15 @@ fn into_subgraph_version_raw_info(
let manifest = deployment
.manifest
.ok_or_else(|| anyhow!("missing manifest"))?;
let manifest_network = manifest
.network
.ok_or_else(|| anyhow!("manifest missing network"))?;

let version_number = version.version;
let version_deployment = DeploymentRawInfo {
id: deployment_id,
allocations: deployment_allocations,
manifest_network: manifest.network,
manifest_network,
manifest_start_block: manifest.start_block,
subgraphs: Default::default(),
transferred_to_l2: deployment_transferred_to_l2,
Expand Down
2 changes: 1 addition & 1 deletion graph-gateway/src/network/subgraph_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ pub mod types {
#[derive(Debug, Clone, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct Manifest {
pub network: String,
pub network: Option<String>,
#[serde_as(as = "serde_with::DisplayFromStr")]
pub start_block: BlockNumber,
}
Expand Down

0 comments on commit 6ec15f6

Please sign in to comment.