From 0b59c25e25050d0c6c0ed4a8dc3f2dfd7a4243fc Mon Sep 17 00:00:00 2001 From: Sameh Abouel-saad Date: Mon, 22 Apr 2024 12:32:37 +0200 Subject: [PATCH] fixing pricing-policy id 0 for some farms --- src/mappings/farms.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/mappings/farms.ts b/src/mappings/farms.ts index 002b84b..f36a305 100644 --- a/src/mappings/farms.ts +++ b/src/mappings/farms.ts @@ -110,7 +110,9 @@ export async function farmUpdated( savedFarm.gridVersion = farmUpdatedEventParsed.version savedFarm.name = validateString(ctx, farmUpdatedEventParsed.name.toString()) savedFarm.twinID = farmUpdatedEventParsed.twinId - savedFarm.pricingPolicyID = farmUpdatedEventParsed.pricingPolicyId + // reason for commented the below line is that update_farm on-chain isnever meant to change the pricing policy attached to a farm + // see here https://github.com/threefoldtech/tfchain_graphql/issues/96#issuecomment-2068325597 + // savedFarm.pricingPolicyID = farmUpdatedEventParsed.pricingPolicyId savedFarm.certification = certification let eventPublicIPs = farmUpdatedEventParsed.publicIps