diff --git a/Golem/Job.cs b/Golem/Job.cs index 41f5284..d306653 100644 --- a/Golem/Job.cs +++ b/Golem/Job.cs @@ -117,6 +117,7 @@ public bool Active } } + public bool IsClosed { get => !Active; } public void UpdateActivityState(ActivityStatePair activityState) { @@ -214,7 +215,7 @@ public static JobStatus ResolveTerminationReason(string? code) Logger.LogInformation($"Job: {this.Id}, confirmed sum: {confirmedSum}, job expected reward: {this.CurrentReward}"); // Workaround for yagna unable to change status to SETTLED when using partial payments - if (this.CurrentReward == confirmedSum) + if (this.IsClosed && this.CurrentReward == confirmedSum) { return IntoPaymentStatus(InvoiceStatus.SETTLED); }