Skip to content

Commit

Permalink
Fix Changenow
Browse files Browse the repository at this point in the history
  • Loading branch information
paullinator committed Jul 28, 2024
1 parent 406d84b commit 762fda8
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 762fda8

Please sign in to comment.