Skip to content

Commit

Permalink
sort by snapshot date
Browse files Browse the repository at this point in the history
  • Loading branch information
ewansheldon committed Dec 8, 2023
1 parent 3715f56 commit 7f31487
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/liquidationPools.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ const getDBData = async userAddress => {
let result = [];
const client = await pool.connect();
try {
result = (await client.query('SELECT snapshot_at, assets FROM user_pool_snapshots_sepolia where user_address = $1', [userAddress])).rows;
const query = 'SELECT snapshot_at, assets FROM user_pool_snapshots_sepolia where user_address = $1 ORDER BY snapshot_at ASC';
result = (await client.query(query, [userAddress])).rows;
} finally {
client.release();
}
Expand Down

0 comments on commit 7f31487

Please sign in to comment.