Skip to content

Commit

Permalink
Fix:
Browse files Browse the repository at this point in the history
return the node id based on the contract type,Enable getting node id for the rent contracts and node contracts
  • Loading branch information
0oM4R committed Jan 1, 2025
1 parent 6d20847 commit c76ba86
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/grid_client/src/primitives/nodes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ class Nodes {
.then(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;
return contract.contractType?.nodeContract?.nodeId || contract.contractType?.rentContract?.nodeId;
})
.catch(err => {
//TODO add error handling in QueryClient/contracts
Expand Down

0 comments on commit c76ba86

Please sign in to comment.