Skip to content

Commit

Permalink
fixing pricing-policy id 0 for some farms (#164)
Browse files Browse the repository at this point in the history
  • Loading branch information
sameh-farouk authored Apr 22, 2024
1 parent 7eac56b commit c4a50cc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/mappings/farms.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c4a50cc

Please sign in to comment.