Skip to content

Commit

Permalink
Merge pull request #881 from golemfactory/eventType-in-yagna-0.15
Browse files Browse the repository at this point in the history
Workaround for yagna 0.15 breaking change in eventType
  • Loading branch information
SewerynKras authored Apr 2, 2024
2 parents 5fd0382 + b0abb7e commit ed9af29
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/agreement/service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
});
Expand Down

0 comments on commit ed9af29

Please sign in to comment.