Skip to content

Commit

Permalink
Fix chain types not being loaded (#275)
Browse files Browse the repository at this point in the history
* Fix chain types not being loaded

* Update changelog
  • Loading branch information
stwiname authored Jul 29, 2024
1 parent b9ba23f commit 111db0d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 2 additions & 0 deletions packages/node/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]
### Fixed
- Chain types not loading correctly (#275)

## [4.0.0] - 2024-07-29
### Changed
Expand Down
5 changes: 5 additions & 0 deletions packages/node/src/configure/SubqueryProject.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import {
CosmosHandlerKind,
CosmosBlockFilter,
} from '@subql/types-cosmos';
import { processNetworkConfig } from '../utils/project';

const { version: packageVersion } = require('../../package.json');

Expand Down Expand Up @@ -58,6 +59,10 @@ export async function createSubQueryProject(
isCustomDs,
});

(project.network as any) = await processNetworkConfig(
project.network,
reader,
);
project.tempDir = getTempDir();

return project;
Expand Down
7 changes: 0 additions & 7 deletions packages/node/src/utils/project.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,6 @@ export async function processNetworkConfig(
network: any,
reader: Reader,
): Promise<CosmosProjectNetConfig> {
if (network.chainId && network.genesisHash) {
throw new Error('Please only provide one of chainId and genesisHash');
} else if (network.genesisHash && !network.chainId) {
network.chainId = network.genesisHash;
}
delete network.genesisHash;

const chaintypes = new Map<string, CosmosChainType>() as Map<
string,
CosmosChainType
Expand Down

0 comments on commit 111db0d

Please sign in to comment.