Skip to content

Commit

Permalink
Fix Changenow
Browse files Browse the repository at this point in the history
  • Loading branch information
paullinator committed Oct 11, 2024
1 parent 5f014ec commit 4be79b7
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/partners/changenow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,9 @@ export const queryChangeNow = async (
const result = await response.json()
const txs = asChangeNowResult(result).exchanges

if (txs.length === 0) {
break
}
for (const rawTx of txs) {
let tx: ChangeNowTx
try {
Expand Down Expand Up @@ -130,11 +133,8 @@ export const queryChangeNow = async (
latestIsoDate = ssTx.isoDate
}
}
datelog(`ChangeNow latestIsoDate ${latestIsoDate}`)
offset += LIMIT
if (txs.length < LIMIT) {
break
}
datelog(`ChangeNow offset ${offset} latestIsoDate ${latestIsoDate}`)
offset += txs.length
retry = 0
} catch (e) {
datelog(e)
Expand Down

0 comments on commit 4be79b7

Please sign in to comment.