Fix: Show referenda approval/support curves on Kusama, Paseo & Westend (no more blank charts) (#12168)

This commit is contained in:
Progress Ochuko Eyaadah 2026-02-20 16:29:04 +01:00 committed by GitHub
parent 5a89436fb3
commit 4d05ece466
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -16,7 +16,7 @@ const zeroGraph = { approval: [BN_ZERO], support: [BN_ZERO], x: [BN_ZERO] };
function expandTracks (tracks: [BN, PalletReferendaTrackDetails][]): TrackDescription[] {
return tracks.map(([id, info]) => ({
graph: info.decisionDeposit && info.minApproval && info.minSupport ? calcCurves(info) : zeroGraph,
graph: info.decisionPeriod && info.minApproval && info.minSupport ? calcCurves(info) : zeroGraph,
id,
info
}));