Skip to content

Commit

Permalink
fix tether attestation diff
Browse files Browse the repository at this point in the history
  • Loading branch information
0xngmi committed Dec 12, 2024
1 parent f3afeac commit c200c17
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fees/tether/attestations-stablecoins.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export function buildStablecoinAdapter(stablecoinId: string, daysBetweenAttestat
const supply = (findClosest(fromTimestamp, stablecoinData.tokens.map((d: any)=>({...d, time: d.date*1e3})), 1.5 * 24 * 3600) as any).circulating.peggedUSD

const closestAttestation = findClosest(fromTimestamp, attestations)
if (new Date(closestAttestation.time).getTime() > fromTimestamp * 1e3 - 1.2 * daysBetweenAttestations * 24 * 3600e3) {
if (new Date(closestAttestation.time).getTime() - 1.2 * daysBetweenAttestations * 24 * 3600e3 > fromTimestamp * 1e3) {
throw new Error("Trying to refill with no attestations, pls add attestations")
}

Expand Down

0 comments on commit c200c17

Please sign in to comment.