Skip to content

Commit

Permalink
feat: set consensus nodes from CLI
Browse files Browse the repository at this point in the history
Signed-off-by: Miguel_LZPF <[email protected]>
  • Loading branch information
MiguelLZPF committed Apr 4, 2024
1 parent fc465e2 commit 4c630f3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
4 changes: 3 additions & 1 deletion cli/src/app/service/utilities/UtilitiesService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,13 @@ export default class UtilitiesService extends Service {
public async initSDK(): Promise<void> {
const account = this.getCurrentAccount();
SDK.log = configurationService.getLogConfiguration();
const network = this.getCurrentNetwork();
await Network.init(
new InitializationRequest({
network: this.getCurrentNetwork().name,
network: network.name,
mirrorNode: this.getCurrentMirror(),
rpcNode: this.getCurrentRPC(),
consensusNodes: network.consensusNodes,
backend: this.getCurrentBackend()
? {
url: this.getCurrentBackend().endpoint,
Expand Down
5 changes: 1 addition & 4 deletions cli/src/app/service/wizard/WizardService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -308,10 +308,7 @@ export default class WizardService extends Service {
await Network.setNetwork(
new SetNetworkRequest({
environment: currentNetwork.name,
consensusNodes:
currentNetwork.consensusNodes.length > 0
? currentNetwork.name
: undefined,
consensusNodes: currentNetwork.consensusNodes,
mirrorNode: currentMirror ? currentMirror : undefined,
rpcNode: currentRPC ? currentRPC : undefined,
}),
Expand Down

0 comments on commit 4c630f3

Please sign in to comment.