From b0abb7ed694f17e872d3768aef0235f1a0696315 Mon Sep 17 00:00:00 2001 From: Seweryn Kras Date: Tue, 2 Apr 2024 15:36:26 +0200 Subject: [PATCH] fix: workaround for yagna 0.15 breaking change in eventType --- src/agreement/service.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/agreement/service.ts b/src/agreement/service.ts index 8061bf5b1..ece9c2911 100644 --- a/src/agreement/service.ts +++ b/src/agreement/service.ts @@ -244,8 +244,9 @@ export class AgreementPoolService { ); events.forEach((event) => { afterTimestamp = event.eventDate; - // @ts-expect-error: Bug in ya-tsclient: typo in eventtype - if (event.eventtype === "AgreementTerminatedEvent") { + // @ts-expect-error: Bug in yagna 0.14. Fixed in 0.15. FIXME: remove once we bump MIN_SUPPORTED_YAGNA + const eventType = event.eventType || event.eventtype; + if (eventType === "AgreementTerminatedEvent") { this.handleTerminationAgreementEvent(event.agreementId, event.reason); } });