Skip to content

Commit

Permalink
fix dictionary service
Browse files Browse the repository at this point in the history
  • Loading branch information
jiqiang90 committed Apr 8, 2024
1 parent 529030a commit 3fb04f5
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions packages/node/src/indexer/dictionary.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,26 +18,24 @@ export class DictionaryService extends CoreDictionaryService {
nodeConfig: NodeConfig,
dictionaryUrl?: string,
) {
super(
dictionaryUrl ?? project.network.dictionary,
project.network.chainId,
nodeConfig,
eventEmitter,
);
super(dictionaryUrl, project.network.chainId, nodeConfig, eventEmitter);
}

static async create(
project: SubqueryProject,
nodeConfig: NodeConfig,
eventEmitter: EventEmitter2,
): Promise<DictionaryService> {
const url =
let url =
project.network.dictionary ??
(await CoreDictionaryService.resolveDictionary(
NETWORK_FAMILY.stellar,
project.network.chainId,
nodeConfig.dictionaryRegistry,
));
if (Array.isArray(url)) {
url = url[0];
}
return new DictionaryService(project, eventEmitter, nodeConfig, url);
}
}

0 comments on commit 3fb04f5

Please sign in to comment.