Fix market JSON dump: was guarded by priceToBeatState.value === null but latching at line 589-595 sets value before line 622 check runs. JSON files never written. Remove the broken guard; dumpedMarkets.has(slug) already ensures once-per-market.
This commit is contained in:
+1
-1
@@ -619,7 +619,7 @@ async function main() {
|
|||||||
const currentPriceValue = currentPriceBaseLine.split(": ")[1] ?? currentPriceBaseLine;
|
const currentPriceValue = currentPriceBaseLine.split(": ")[1] ?? currentPriceBaseLine;
|
||||||
const currentPriceLine = kv("CURRENT PRICE:", `${currentPriceValue} (${ptbDeltaText})`);
|
const currentPriceLine = kv("CURRENT PRICE:", `${currentPriceValue} (${ptbDeltaText})`);
|
||||||
|
|
||||||
if (poly.ok && poly.market && priceToBeatState.value === null) {
|
if (poly.ok && poly.market) {
|
||||||
const slug = safeFileSlug(poly.market.slug || poly.market.id || "market");
|
const slug = safeFileSlug(poly.market.slug || poly.market.id || "market");
|
||||||
if (slug && !dumpedMarkets.has(slug)) {
|
if (slug && !dumpedMarkets.has(slug)) {
|
||||||
dumpedMarkets.add(slug);
|
dumpedMarkets.add(slug);
|
||||||
|
|||||||
Reference in New Issue
Block a user