Skip to content

Commit 2887510

Browse files
committed
dont use string but AccountId for the genesis-network.json constructor
Signed-off-by: instamenta <[email protected]>
1 parent f4c3cc7 commit 2887510

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/core/genesis_network_models/genesisNetworkNodeDataWrapper.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import type {GenesisNetworkNodeStructure, ServiceEndpoint, ToObject} from '../..
2020
export class GenesisNetworkNodeDataWrapper
2121
implements GenesisNetworkNodeStructure, ToObject<{node: GenesisNetworkNodeStructure}>
2222
{
23-
public accountId: AccountId | string;
23+
public accountId: AccountId;
2424
public gossipEndpoint: ServiceEndpoint[] = [];
2525
public serviceEndpoint: ServiceEndpoint[] = [];
2626
public gossipCaCertificate: string;
@@ -50,6 +50,7 @@ export class GenesisNetworkNodeDataWrapper
5050
this.gossipEndpoint.push({domainName, port});
5151
}
5252

53+
// @ts-ignore
5354
public toObject() {
5455
return {
5556
node: {

src/core/profile_manager.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ import * as constants from './constants.js';
2828
import {type ConfigManager} from './config_manager.js';
2929
import * as helpers from './helpers.js';
3030
import {getNodeAccountMap} from './helpers.js';
31+
import {AccountId} from '@hashgraph/sdk';
3132
import type {SemVer} from 'semver';
3233
import type {SoloLogger} from './logging.js';
3334
import type {AnyObject, DirPath, NodeAlias, NodeAliases, Path} from '../types/aliases.js';
@@ -519,7 +520,7 @@ export class ProfileManager {
519520
const nodeDataWrapper = genesisNetworkData.nodes[nodeAlias];
520521

521522
nodeDataWrapper.weight = nodeStakeAmount;
522-
nodeDataWrapper.accountId = account;
523+
nodeDataWrapper.accountId = AccountId.fromString(account);
523524

524525
//? Add gossip endpoints
525526
nodeDataWrapper.addGossipEndpoint(externalIP, externalPort);

0 commit comments

Comments
 (0)