Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix generateAbis when datasource without assets #309

Merged
merged 1 commit into from
Jun 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading