From 730d9c297c78bb69a9e814bc468f5932ba0d4ea3 Mon Sep 17 00:00:00 2001 From: Sameh Abouel-saad Date: Fri, 7 Jun 2024 00:34:24 +0300 Subject: [PATCH] fix: fixing assertion error at get asV101 --- src/mappings/farms.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mappings/farms.ts b/src/mappings/farms.ts index 106e81e..9166674 100644 --- a/src/mappings/farms.ts +++ b/src/mappings/farms.ts @@ -140,14 +140,14 @@ export async function farmUpdated( let eventValue = item.event.args as v63.Farm eventValue.dedicatedFarm = false farmUpdatedEventParsed = farmUpdatedEvent.asV63 - switch (farmUpdatedEvent.asV101.certification.__kind) { + switch (farmUpdatedEventParsed.certification.__kind) { case "Gold": { certification = FarmCertification.Gold } } } else if (farmUpdatedEvent.isV101) { farmUpdatedEventParsed = farmUpdatedEvent.asV101 - switch (farmUpdatedEvent.asV101.certification.__kind) { + switch (farmUpdatedEventParsed.certification.__kind) { case "Gold": { certification = FarmCertification.Gold }