Skip to content

Commit

Permalink
bug: pindexer: dex-explorer: add columns to the correct table
Browse files Browse the repository at this point in the history
  • Loading branch information
cronokirby committed Nov 18, 2024
1 parent 50d5dfa commit 75af13a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion crates/bin/pindexer/src/dex_ex/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,7 @@ mod summary {
SELECT
COALESCE(SUM(direct_volume), 0.0) AS direct_volume_over_window,
COALESCE(SUM(swap_volume), 0.0) AS swap_volume_over_window,
COALESCE(SUM(trades), 0.0) AS trades_over_window
COALESCE(SUM(trades), 0.0) AS trades_over_window,
COALESCE(MIN(price), 0.0) AS low,
COALESCE(MAX(price), 0.0) AS high
FROM snapshots
Expand Down
4 changes: 2 additions & 2 deletions crates/bin/pindexer/src/dex_ex/schema.sql
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@ CREATE TABLE IF NOT EXISTS dex_ex_pairs_block_snapshot (
asset_start BYTEA NOT NULL,
asset_end BYTEA NOT NULL,
price FLOAT8 NOT NULL,
low FLOAT8 NOT NULL,
high FLOAT8 NOT NULL,
liquidity FLOAT8 NOT NULL,
direct_volume FLOAT8 NOT NULL,
swap_volume FLOAT8 NOT NULL,
Expand All @@ -51,6 +49,8 @@ CREATE TABLE IF NOT EXISTS dex_ex_pairs_summary (
the_window TEXT NOT NULL,
price FLOAT8 NOT NULL,
price_then FLOAT8 NOT NULL,
low FLOAT8 NOT NULL,
high FLOAT8 NOT NULL,
liquidity FLOAT8 NOT NULL,
liquidity_then FLOAT8 NOT NULL,
direct_volume_over_window FLOAT8 NOT NULL,
Expand Down

0 comments on commit 75af13a

Please sign in to comment.