Skip to content

Commit

Permalink
Fix calculate mana stats
Browse files Browse the repository at this point in the history
  • Loading branch information
sipec committed Jul 11, 2024
1 parent 7ae27ab commit e8a26a0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions backend/shared/src/calculate-mana-stats.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export const calculateManaStats = async (
`
select from_type,
to_type,
data ->> 'token' as token,
token,
data -> 'data' ->> 'questType' as quest_type,
category,
sum(amount) as total_amount
Expand All @@ -37,7 +37,7 @@ export const calculateManaStats = async (
and category not in ('CONSUME_SPICE', 'CONSUME_SPICE_DONE')
group by from_type,
to_type,
data ->> 'token',
token,
data -> 'data' ->> 'questType',
category;`,
[startTime, endTime],
Expand All @@ -50,7 +50,7 @@ export const calculateManaStats = async (
)
const fees = await pg.one(
`select sum((data->'fees'->'platformFee')::numeric) as platform_fees
from contract_bets
from contract_bets
where created_time >$1
and created_time < $2`,
[startTime, endTime],
Expand Down

0 comments on commit e8a26a0

Please sign in to comment.