Skip to content

Commit

Permalink
Fix generateAbis when datasource without assets (#309)
Browse files Browse the repository at this point in the history
  • Loading branch information
jiqiang90 authored Jun 10, 2024
1 parent d8a7def commit 6413d79
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions packages/common-ethereum/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Fixed
- Fix `generateAbis` when datasource without assets

## [3.8.2] - 2024-06-10
### Fixed
- Abi validatation when DS doesn't specify abi option (#307)
Expand Down
2 changes: 1 addition & 1 deletion packages/common-ethereum/src/codegen/codegen-controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ export async function generateAbis(
// @subql/cli package calls this function with datasources as an array of objects
datasources = datasources.map((d) => ({
...d,
assets: d.assets instanceof Map ? d.assets : new Map(Object.entries(d.assets)),
assets: d?.assets ? (d.assets instanceof Map ? d.assets : new Map(Object.entries(d.assets))) : undefined,
})) as SubqlRuntimeDatasource[];

validateAbi(datasources, projectPath);
Expand Down

0 comments on commit 6413d79

Please sign in to comment.