Skip to content

Commit

Permalink
Merge pull request #209 from nevermined-io/fix/subgraph-blocknumber
Browse files Browse the repository at this point in the history
fix: bug getting the block number with the updated subgraphs
  • Loading branch information
r-marques authored Jul 19, 2023
2 parents a7b0459 + bb8fae0 commit 2f943e1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "node-ts",
"version": "1.4.0",
"version": "1.4.1",
"description": "Nevermined Node",
"main": "main.ts",
"scripts": {
Expand Down
9 changes: 2 additions & 7 deletions src/shared/nevermined/nvm.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -482,6 +482,7 @@ export class NeverminedService {
_agreementId: true,
_did: true,
_receiver: true,
blockNumber: true,
},
}

Expand All @@ -496,12 +497,6 @@ export class NeverminedService {
)
}

if (event.blockNumber) {
return event.blockNumber
} else if (event.id) {
const [transactionHash] = event.id.split('-')
const transactionReceipt = await this.nevermined.utils.web3.getTransaction(transactionHash)
return transactionReceipt.blockNumber
}
return Number(event.blockNumber)
}
}

0 comments on commit 2f943e1

Please sign in to comment.