Fix coinn supply query: Or the value is incompatible or it must be interpolated (using ^) so it may be cast accordingly in query

pull/3132/head
Victor Baranov 4 years ago
parent f78dac3f8f
commit e07f2a3b28
  1. 4
      apps/explorer/lib/explorer/chain.ex

@ -1518,7 +1518,7 @@ defmodule Explorer.Chain do
a0 in Address,
select: fragment("SUM(a0.fetched_coin_balance)"),
where: a0.hash != ^burn_address_hash,
where: a0.fetched_coin_balance > 0
where: a0.fetched_coin_balance > ^0
)
Repo.one!(query) || 0
@ -1530,7 +1530,7 @@ defmodule Explorer.Chain do
from(
a0 in Address,
select: fragment("SUM(a0.fetched_coin_balance)"),
where: a0.fetched_coin_balance > 0
where: a0.fetched_coin_balance > ^0
)
Repo.one!(query) || 0

Loading…
Cancel
Save