From 5e38958dd83d3fcd308ab19a7dbd47ab343638e9 Mon Sep 17 00:00:00 2001 From: JQQQ Date: Mon, 8 Apr 2024 13:52:05 +1200 Subject: [PATCH] update for node --- packages/node/CHANGELOG.md | 7 ++++++- packages/node/package.json | 4 ++-- packages/node/src/indexer/dictionary.service.ts | 12 +++++------- 3 files changed, 13 insertions(+), 10 deletions(-) diff --git a/packages/node/CHANGELOG.md b/packages/node/CHANGELOG.md index cea9c211..018a5a9a 100644 --- a/packages/node/CHANGELOG.md +++ b/packages/node/CHANGELOG.md @@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [3.10.0] - 2024-04-08 +### Changed +- Update `@subql/common` to 3.5.0, also allow user use array for dictionary + ## [3.9.1] - 2024-03-14 ### Changed - Update `@subql/node-core` to 4.7.2 with graphql comments escaping fix @@ -220,7 +224,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Synced latest changes from main repo. (#10) ## [1.6.0] - 2022-08-04 -[Unreleased]: https://github.com/subquery/subql-algorand/compare/node-algorand/3.9.1...HEAD +[Unreleased]: https://github.com/subquery/subql-algorand/compare/node-algorand/3.10.0...HEAD +[3.10.0]: https://github.com/subquery/subql-algorand/compare/node-algorand/3.9.1...node-algorand/3.10.0 [3.9.1]: https://github.com/subquery/subql-algorand/compare/node-algorand/3.9.0...node-algorand/3.9.1 [3.9.0]: https://github.com/subquery/subql-algorand/compare/node-algorand/3.8.1...node-algorand/3.9.0 [3.8.1]: https://github.com/subquery/subql-algorand/compare/node-algorand/3.8.0...node-algorand/3.8.1 diff --git a/packages/node/package.json b/packages/node/package.json index c7983896..5f94f089 100644 --- a/packages/node/package.json +++ b/packages/node/package.json @@ -1,6 +1,6 @@ { "name": "@subql/node-algorand", - "version": "3.9.1", + "version": "3.10.0", "description": "", "author": "Ian He", "license": "GPL-3.0", @@ -25,7 +25,7 @@ "@nestjs/event-emitter": "^2.0.0", "@nestjs/platform-express": "^9.4.0", "@nestjs/schedule": "^3.0.1", - "@subql/common": "^3.4.1", + "@subql/common": "^3.5.0", "@subql/common-algorand": "workspace:*", "@subql/node-core": "^7.4.2", "@subql/types-algorand": "workspace:*", diff --git a/packages/node/src/indexer/dictionary.service.ts b/packages/node/src/indexer/dictionary.service.ts index 66c8b627..ea0bd1db 100644 --- a/packages/node/src/indexer/dictionary.service.ts +++ b/packages/node/src/indexer/dictionary.service.ts @@ -19,12 +19,7 @@ export class DictionaryService extends CoreDictionaryService { eventEmitter: EventEmitter2, dictionaryUrl?: string, ) { - super( - dictionaryUrl ?? project.network.dictionary, - project.network.chainId, - nodeConfig, - eventEmitter, - ); + super(dictionaryUrl, project.network.chainId, nodeConfig, eventEmitter); } protected validateChainMeta(metaData: MetaData): boolean { @@ -37,7 +32,7 @@ export class DictionaryService extends CoreDictionaryService { nodeConfig: NodeConfig, eventEmitter: EventEmitter2, ): Promise { - const url = + let url = project.network.dictionary ?? (await CoreDictionaryService.resolveDictionary( NETWORK_FAMILY.algorand, @@ -45,6 +40,9 @@ export class DictionaryService extends CoreDictionaryService { nodeConfig.dictionaryRegistry, )); + if (Array.isArray(url)) { + url = url[0]; + } return new DictionaryService(project, nodeConfig, eventEmitter, url); } }