diff --git a/CHANGELOG.md b/CHANGELOG.md index a9ecc5cb922..707b81030a5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -464,6 +464,7 @@ - [8702](https://github.com/vegaprotocol/vega/issues/8702) - Fix panic on auction exit after stop orders expired in auction - [8703](https://github.com/vegaprotocol/vega/issues/8703) - Wire stop orders cancellation - [8698](https://github.com/vegaprotocol/vega/issues/8698) - Always set the `ToAccount` field when clearing fees. +- [9773](https://github.com/vegaprotocol/vega/issues/9773) - Ensure invalid market for transfer doesn't panic ## 0.71.0 diff --git a/core/execution/common/market_activity_tracker.go b/core/execution/common/market_activity_tracker.go index c730c9b2c6b..a1413fa1190 100644 --- a/core/execution/common/market_activity_tracker.go +++ b/core/execution/common/market_activity_tracker.go @@ -711,6 +711,9 @@ func (mat *MarketActivityTracker) calculateMetricForParty(asset, party string, m // for each market in scope, for each epoch in the time window get the metric entry, sum up for each epoch in the time window and divide by window size (or calculate variance - for volatility) for _, market := range markets { marketTracker := assetTrackers[market] + if marketTracker == nil { + continue + } switch metric { case vega.DispatchMetric_DISPATCH_METRIC_AVERAGE_POSITION: uTotal += marketTracker.getPositionMetricTotal(party, windowSize)