Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 3 additions & 13 deletions src/services/api/smols.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,19 +54,9 @@ export async function fetchSmols(options?: { limit?: number; signal?: AbortSigna
};
});

// 3. Add songs from snapshot that aren't in the live response
const liveIds = new Set(liveSmols.map((s) => s.Id));
snapshot.forEach((oldSmol) => {
if (!liveIds.has(oldSmol.Id)) {
merged.push({
...oldSmol,
Tags: oldSmol.Tags || [],
Address: oldSmol.Address || undefined,
Minted_By: oldSmol.Minted_By || undefined,
Username: oldSmol.Username || undefined,
});
}
});
// 3. Do NOT append snapshot-only songs when live API succeeded.
// Live must remain authoritative for "latest" ordering and corpus freshness.
// Snapshot is only a field-level fallback for known live IDs.

// 4. DEEP VERIFICATION: Hydrate missing metadata for "Live-Only" songs
// (Songs present in API but not in snapshot = New drops missing tags/address)
Expand Down
4 changes: 3 additions & 1 deletion src/services/api/snapshot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ export async function getSnapshotAsync(): Promise<Smol[]> {
if (cachedSnapshot) return cachedSnapshot;

try {
const res = await fetch('/data/GalacticSnapshot.json');
const res = await fetch('/data/GalacticSnapshot.json', {
cache: 'no-store',
});
if (!res.ok) throw new Error(`Snapshot load failed: ${res.status}`);
const data = await res.json();

Expand Down