Skip to content

Commit

Permalink
Fix:
Browse files Browse the repository at this point in the history
Enable getting node id for the rent contracts and node contracts
  • Loading branch information
0oM4R committed Jan 1, 2025
1 parent 2811f6d commit 6d20847
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/grid_client/src/primitives/nodes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -161,8 +161,8 @@ class Nodes {
return tfclient.contracts
.get({ id: contractId })
.then(contract => {
if (!contract.contractType.nodeContract)
throw new ValidationError(`Couldn't get node id for this contract ${contractId}. It's not a node contract.`);
if (contract.contractType.nameContract)
throw new ValidationError(`Couldn't get node id for this contract ${contractId}. It's a name contract.`);
return contract.contractType.nodeContract.nodeId;
})
.catch(err => {
Expand Down

0 comments on commit 6d20847

Please sign in to comment.