From 5121f7ca230e36fe8eba1b767e8aea4baf8ec336 Mon Sep 17 00:00:00 2001 From: hopeyen <60078528+hopeyen@users.noreply.github.com> Date: Wed, 18 Dec 2024 16:17:45 +0000 Subject: [PATCH] fix: handle nil reader --- disperser/apiserver/server_v2.go | 1 + 1 file changed, 1 insertion(+) diff --git a/disperser/apiserver/server_v2.go b/disperser/apiserver/server_v2.go index 9802d8c19..2aadb961c 100644 --- a/disperser/apiserver/server_v2.go +++ b/disperser/apiserver/server_v2.go @@ -317,6 +317,7 @@ func (s *DispersalServerV2) GetPaymentState(ctx context.Context, req *pb.GetPaym onDemandPayment, err := s.meterer.ChainPaymentState.GetOnDemandPaymentByAccount(ctx, accountID) if err != nil { s.logger.Debug("failed to get ondemand payment, use zero value", "err", err, "accountID", accountID) + onchainCumulativePayment = } else { onchainCumulativePayment = onDemandPayment.CumulativePayment }