Skip to content

Commit b396d02

Browse files
JulianVenturaJulian VenturaJuArce
authored
hotfix(explorer): Fix the proof price average (#1717)
Co-authored-by: Julian Ventura <[email protected]> Co-authored-by: Julian Arce <[email protected]>
1 parent 281b246 commit b396d02

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

explorer/lib/explorer/models/batches.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ defmodule Batches do
144144
query =
145145
from(b in Batches,
146146
where: b.is_verified == true,
147-
select: avg(b.fee_per_proof)
147+
select: sum(b.fee_per_proof * b.amount_of_proofs) / sum(b.amount_of_proofs)
148148
)
149149

150150
case Explorer.Repo.one(query) do

0 commit comments

Comments
 (0)