Skip to content

Commit

Permalink
fix 24h volume
Browse files Browse the repository at this point in the history
  • Loading branch information
vrtnd committed Sep 27, 2024
1 parent 52de32b commit f4afea1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/utils/wrappa/postgres/query.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ interface ITransaction {
usd_value?: number;
is_usd_volume?: boolean;
txs_counted_as?: number;
origin_chain?: string;
}

interface IAggregatedData {
Expand Down Expand Up @@ -329,7 +330,7 @@ const getLargeTransaction = async (txPK: number, timestamp: number) => {
type VolumeType = "deposit" | "withdrawal" | "both";

const getLast24HVolume = async (bridgeName: string, volumeType: VolumeType = "both"): Promise<number> => {
const twentyFourHoursAgo = Math.floor(Date.now() / 1000) - 24 * 60 * 60;
const twentyFourHoursAgo = Math.floor(Date.now() / 1000) - 25 * 60 * 60;

let volumeColumn = sql``;
switch (volumeType) {
Expand Down

0 comments on commit f4afea1

Please sign in to comment.