Skip to content

Commit

Permalink
Fix all except internal txs of an account query
Browse files Browse the repository at this point in the history
  • Loading branch information
jairajdev committed Apr 18, 2024
1 parent f7baf7e commit c5f35a6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/storage/transaction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -462,8 +462,8 @@ export async function queryTransactions(
// address,
// address,
// ])
const sql = `SELECT * FROM transactions WHERE transactionType!=? AND (txFrom=? OR txTo=? OR nominee=?)`
transactions = await db.get(sql, [TransactionType.InternalTxReceipt, address, address, address])
const sql = `SELECT * FROM transactions WHERE transactionType!=? AND (txFrom=? OR txTo=? OR nominee=?) ORDER BY cycle DESC, timestamp DESC LIMIT ${limit} OFFSET ${skip}`
transactions = await db.all(sql, [TransactionType.InternalTxReceipt, address, address, address])
} else if (
txType === TransactionSearchType.Receipt ||
txType === TransactionSearchType.NodeRewardReceipt ||
Expand Down

0 comments on commit c5f35a6

Please sign in to comment.