Skip to content
Open
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
11 changes: 11 additions & 0 deletions src/lib/promoCreditCategories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -675,6 +675,17 @@ const encryptedSelfServicePromos: readonly EncryptedSelfServicePromoCreditCatego
description: 'Austin ClawCon Credits',
total_redemptions_allowed: 2000,
},
{
// Replace with output of: pnpm promo encrypt CREATOR_CLAW
encrypted_credit_category: 'PLACEHOLDER:NEEDS_ENCRYPTION:CREATOR_CLAW',
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CRITICAL: Placeholder promo code will crash decryption in production

selfServicePromos decrypts every encrypted_credit_category at module load, so this placeholder is not just a reminder. In non-test environments decryptPromoCode('PLACEHOLDER:NEEDS_ENCRYPTION:CREATOR_CLAW') will throw before the promo list finishes building, which can break any route that imports promoCreditCategories. Replace this with the real encrypted value before merge, or keep the entry out of the array until that value is available.

is_user_selfservicable: true,
is_idempotent: true,
amount_usd: 100,
expiry_hours: 30 * 24,
promotion_ends_at: new Date('2026-04-20'),
description: 'Creator Claw Credits',
total_redemptions_allowed: 30,
},
];

const selfServicePromos: readonly SelfServicePromoCreditCategoryConfig[] =
Expand Down
Loading