Skip to content

Commit f416e97

Browse files
fix: update farming policy id when node is updated
1 parent 8cd63a6 commit f416e97

File tree

5 files changed

+6
-5
lines changed

5 files changed

+6
-5
lines changed

indexer/chart/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ name: tfchainindexer
22
description: Helm Chart for the tfchain hydra indexer
33
version: 2.4.0
44
apiVersion: v2
5-
appVersion: "2.5.12"
5+
appVersion: "2.5.13"

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "graphql_tfgrid",
33
"private": "true",
4-
"version": "2.5.12",
4+
"version": "2.5.13",
55
"description": "GraphQL server and Substrate indexer. Generated with ♥ by Hydra-CLI",
66
"author": "",
77
"license": "ISC",

processor-chart/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ apiVersion: v2
22
name: tfchain-processor
33
description: A chart for the tfchain graphql processor and query node
44
version: 1.0.4
5-
appVersion: "2.5.12"
5+
appVersion: "2.5.13"

src/mappings/nodes.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,7 @@ export async function nodeUpdated(ctx: EventHandlerContext) {
141141
savedNode.nodeID = nodeEvent.id
142142
savedNode.twinID = nodeEvent.twinId
143143
savedNode.updatedAt = BigInt(ctx.event.blockTimestamp)
144+
savedNode.farmingPolicyId = nodeEvent.farmingPolicyId
144145

145146
// Recalculate total / free resoures when a node get's updated
146147
let resourcesTotal = await ctx.store.get(NodeResourcesTotal, { where: { node: savedNode } })
@@ -210,7 +211,7 @@ export async function nodeUpdated(ctx: EventHandlerContext) {
210211
nodeEvent = node.asV101
211212
} else if (node.isV63) {
212213
nodeEvent = node.asV63
213-
}else if (node.isV105) {
214+
} else if (node.isV105) {
214215
nodeEvent = node.asV105
215216
} else {
216217
return

0 commit comments

Comments
 (0)