From c200c17e820f3a7bd05b1762f70a88ed78800b01 Mon Sep 17 00:00:00 2001 From: 0xngmi <0xngmi@protonmail.com> Date: Thu, 12 Dec 2024 15:57:55 +0000 Subject: [PATCH] fix tether attestation diff --- fees/tether/attestations-stablecoins.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fees/tether/attestations-stablecoins.ts b/fees/tether/attestations-stablecoins.ts index dc5659e007..387abbac4b 100644 --- a/fees/tether/attestations-stablecoins.ts +++ b/fees/tether/attestations-stablecoins.ts @@ -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") }