File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -4,8 +4,6 @@ import { queryTransactionsTimestampRangeByBridgeNetwork } from "../utils/wrappa/
44import { importBridgeNetwork } from "../data/importBridgeNetwork" ;
55import { normalizeChain } from "../utils/normalizeChain" ;
66
7- const maxResponseTxs = 6000 ; // maximum number of transactions to return
8-
97const getTransactions = async (
108 startTimestamp ?: string ,
119 endTimestamp ?: string ,
@@ -41,15 +39,14 @@ const getTransactions = async (
4139 if ( typeof address === "string" ) {
4240 [ addressChain , addressHash ] = address ?. split ( ":" ) ;
4341 }
44- const integerLimit = isNaN ( parseInt ( limit ?? "100000" ) ) ? maxResponseTxs : parseInt ( limit ?? "100000" ) ;
45- const responseLimit = Math . min ( maxResponseTxs , integerLimit ) ;
42+ const queryLimit = limit && ! isNaN ( parseInt ( limit ) ) ? parseInt ( limit ) : undefined ;
4643
4744 const transactions = ( await queryTransactionsTimestampRangeByBridgeNetwork (
4845 queryStartTimestamp ,
4946 queryEndTimestamp ,
5047 queryName ,
5148 queryChain ,
52- responseLimit
49+ queryLimit
5350 ) ) as any [ ] ;
5451
5552 const response = transactions
@@ -73,8 +70,7 @@ const getTransactions = async (
7370 }
7471 return tx ;
7572 } )
76- . filter ( ( tx ) => tx )
77- . slice ( 0 , responseLimit ) ;
73+ . filter ( ( tx ) => tx ) ;
7874
7975 return response ;
8076} ;
Original file line number Diff line number Diff line change @@ -300,6 +300,7 @@ const queryTransactionsTimestampRangeByBridgeNetwork = async (
300300 transactions.token,
301301 transactions.amount,
302302 transactions.is_deposit,
303+ transactions.is_usd_volume,
303304 transactions.chain,
304305 config.bridge_name,
305306 config.destination_chain,
You can’t perform that action at this time.
0 commit comments