From 0c64bac89f25336c96de92fb3281ea94d57851e2 Mon Sep 17 00:00:00 2001 From: wwestgarth Date: Wed, 14 Aug 2024 13:59:30 +0100 Subject: [PATCH] fix: send empty factors for party that does no quality --- core/volumediscount/engine.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/core/volumediscount/engine.go b/core/volumediscount/engine.go index 971e9adf6f..8f6b4efa0a 100644 --- a/core/volumediscount/engine.go +++ b/core/volumediscount/engine.go @@ -210,9 +210,10 @@ func (e *Engine) computeFactorsByParty(ctx context.Context, epoch uint64) { // if the party hasn't qualified, then still send the stats but with a zero factor if !qualifiedForTier { evt.Stats = append(evt.Stats, &eventspb.PartyVolumeDiscountStats{ - PartyId: party.String(), - DiscountFactor: "0", - RunningVolume: notionalVolume.Round(0).String(), + PartyId: party.String(), + DiscountFactor: "0", + DiscountFactors: types.EmptyFactors.IntoDiscountFactorsProto(), + RunningVolume: notionalVolume.Round(0).String(), }) } }