nathan i will hurt you if this was you

This commit is contained in:
End 2026-03-17 15:14:46 -07:00
parent b3cdfd7ade
commit b42a009a9f
No known key found for this signature in database

View file

@ -163,7 +163,7 @@ export async function getUserScrapsBalance(
})
.from(projectsTable)
.where(
sql`${projectsTable.userId} = ${userId} AND ${projectsTable.scrapsPaidAt} IS NOT NULL AND ${projectsTable.scrapsAwarded} > 0`,
sql`${projectsTable.userId} = ${userId} AND (${projectsTable.scrapsPaidAt} IS NOT NULL OR ${projectsTable.scrapsPaidAmount} > 0) AND ${projectsTable.scrapsAwarded} > 0`,
);
// Pending scraps: scrapsAwarded for shipped unpaid projects