Skip to content

Commit

Permalink
fix fetch due to type changed (#1282)
Browse files Browse the repository at this point in the history
* fix fetch due to type changed

* prerelease for types
  • Loading branch information
jiqiang90 committed Sep 6, 2022
1 parent 57453cb commit e892de2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/node/src/indexer/fetch.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ export class FetchService implements OnApplicationShutdown {
await this.dynamicDsService.getDynamicDatasources();
}

getDictionaryQueryEntries(): DictionaryQueryEntry[] {
async getDictionaryQueryEntries(): Promise<DictionaryQueryEntry[]> {
const queryEntries: DictionaryQueryEntry[] = [];

const dataSources = this.project.dataSources.filter(
Expand All @@ -155,7 +155,7 @@ export class FetchService implements OnApplicationShutdown {
if (isCustomDs(ds)) {
const processor = plugin.handlerProcessors[handler.kind];
if (processor.dictionaryQuery) {
const queryEntry = processor.dictionaryQuery(
const queryEntry = await processor.dictionaryQuery(
(handler as SubstrateCustomHandler).filter,
ds,
);
Expand Down Expand Up @@ -216,8 +216,8 @@ export class FetchService implements OnApplicationShutdown {
);
}

updateDictionary(): void {
this.dictionaryQueryEntries = this.getDictionaryQueryEntries();
async updateDictionary(): Promise<void> {
this.dictionaryQueryEntries = await this.getDictionaryQueryEntries();
this.useDictionary =
!!this.dictionaryQueryEntries?.length &&
!!this.project.network.dictionary;
Expand Down
3 changes: 3 additions & 0 deletions packages/types/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ All logs must start with the format: [x.y.z] - yyyy-mm-dd

## [Unreleased]

### Changed
- change types to support wasm processor (#1280)

## [1.4.0] - 2022-08-26

### Changed
Expand Down

0 comments on commit e892de2

Please sign in to comment.