File tree Expand file tree Collapse file tree 3 files changed +13
-6
lines changed
Expand file tree Collapse file tree 3 files changed +13
-6
lines changed Original file line number Diff line number Diff line change @@ -97,6 +97,9 @@ export const queryChangeNow = async (
9797 const result = await response . json ( )
9898 const txs = asChangeNowResult ( result ) . exchanges
9999
100+ if ( txs . length === 0 ) {
101+ break
102+ }
100103 for ( const rawTx of txs ) {
101104 let tx : ChangeNowTx
102105 try {
@@ -130,11 +133,8 @@ export const queryChangeNow = async (
130133 latestIsoDate = ssTx . isoDate
131134 }
132135 }
133- datelog ( `ChangeNow latestIsoDate ${ latestIsoDate } ` )
134- offset += LIMIT
135- if ( txs . length < LIMIT ) {
136- break
137- }
136+ datelog ( `ChangeNow offset ${ offset } latestIsoDate ${ latestIsoDate } ` )
137+ offset += txs . length
138138 retry = 0
139139 } catch ( e ) {
140140 datelog ( e )
Original file line number Diff line number Diff line change @@ -130,7 +130,7 @@ const QUERY_LIMIT_TXS = 50
130130 * How far to rollback from the last successful query
131131 * date when starting a new query
132132 */
133- const QUERY_LOOKBACK = 1000 * 60 * 60 * 24 * 30 // 30 days
133+ const QUERY_LOOKBACK = 1000 * 60 * 60 * 24 * 7 // 30 days
134134
135135/** Time period to query per loop */
136136const QUERY_TIME_BLOCK_MS = QUERY_LOOKBACK
Original file line number Diff line number Diff line change @@ -8,14 +8,21 @@ const CURRENCY_CONVERSION = {
88 AWCBEP20 : 'AWC' ,
99 AWCBSC : 'AWC' ,
1010 DAIMATIC : 'DAI' ,
11+ ETHARB : 'ETH' ,
1112 ETHOP : 'ETH' ,
13+ ETHBASE : 'ETH' ,
14+ GALAERC20 : 'GALA' ,
1215 WBTCMATIC : 'WBTC' ,
1316 USDCERC20 : 'USDC' ,
1417 USDT20 : 'USDT' ,
1518 USDTERC20 : 'USDT' ,
1619 USDTPOLYGON : 'USDT' ,
20+ USDCARB : 'USDC' ,
1721 USDCPOLYGON : 'USDC' ,
1822 USDCTRC20 : 'USDC' ,
23+ USDDTRC20 : 'USDD' ,
24+ USDTARB : 'USDT' ,
25+ USDTSOL : 'USDT' ,
1926 USDTTRC20 : 'USDT' ,
2027 ZADDR : 'ZEC' ,
2128 BCHABC : 'BCH' ,
You can’t perform that action at this time.
0 commit comments