Skip to content

Commit

Permalink
fix: support hydra-typegen for deprecated runtime modules
Browse files Browse the repository at this point in the history
affects: @joystream/hydra-typegen
  • Loading branch information
zeeshanakram3 committed Sep 26, 2023
2 parents 84243e8 + af4fbc8 commit 3143361
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/hydra-typegen/src/metadata/extract.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ function extractCall(
const module = meta.pallets.find((v) => weakEquals(v.name, moduleName))

if (module === undefined || module.calls === undefined) {
throw new Error(`No metadata found for module ${moduleName}`)
return undefined // extrinsic module not found
}

let callVariant: Si1Variant | undefined
Expand Down Expand Up @@ -105,7 +105,7 @@ function extractEvent(
const module = meta.pallets.find((v) => weakEquals(v.name, moduleName))

if (module === undefined || module.events === undefined) {
throw new Error(`No metadata found for module ${moduleName}`)
return undefined // Event module not found
}

let eventVaraint: Si1Variant | undefined
Expand Down

0 comments on commit 3143361

Please sign in to comment.