Skip to content

Commit

Permalink
Make uppper end of filter look up to one day out
Browse files Browse the repository at this point in the history
  • Loading branch information
GeekLad committed Oct 13, 2024
1 parent 93d4247 commit 4e508c8
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 3 deletions.
Binary file modified bun.lockb
Binary file not shown.
5 changes: 4 additions & 1 deletion components/summary/generate-summary.ts
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,10 @@ export function applyFilter(
return transactions.filter((tx) => {
if (tx.block_time < transactionFilter.startDate.getTime() / 1000)
return false;
if (tx.block_time > transactionFilter.endDate.getTime() / 1000)
if (
tx.block_time >
transactionFilter.endDate.getTime() / 1000 + 60 * 60 * 24
)
return false;
if (transactionFilter.positionStatus === "closed" && tx.position_is_open)
return false;
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "next-pages-template",
"version": "3.1.2",
"version": "3.1.3",
"author": {
"name": "GeekLad"
},
Expand Down
2 changes: 1 addition & 1 deletion public/workers/data-worker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ async function readData(walletAddress: string) {
if (record?.data) {
const db = new sql.Database(record?.data);
const statement = db.prepare(`
SELECT * FROM v_transactions
SELECT * FROM v_transactions where owner_address = '${walletAddress}'
`);
while (statement.step())
transactions.push(statement.getAsObject() as MeteoraDlmmDbTransactions);
Expand Down

0 comments on commit 4e508c8

Please sign in to comment.