2 Commits

Author SHA1 Message Date
syntaxbullet
01bb73f6a2 chore: bump version
All checks were successful
Deploy to Production / test (push) Successful in 36s
2026-03-26 15:21:28 +01:00
syntaxbullet
602147e961 feat: cap daily reward at 500 AU
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-26 15:21:01 +01:00
2 changed files with 6 additions and 2 deletions

View File

@@ -1,6 +1,6 @@
{
"name": "app",
"version": "1.1.4-pre",
"version": "1.1.5",
"module": "bot/index.ts",
"type": "module",
"private": true,

View File

@@ -119,7 +119,11 @@ export const economyService = {
const isWeeklyCurrent = streak > 0 && streak % 7 === 0;
const weeklyBonusAmount = isWeeklyCurrent ? config.economy.daily.weeklyBonus : 0n;
const totalReward = config.economy.daily.amount + bonus + weeklyBonusAmount;
const MAX_DAILY_REWARD = 500n;
const totalReward = (() => {
const raw = config.economy.daily.amount + bonus + weeklyBonusAmount;
return raw > MAX_DAILY_REWARD ? MAX_DAILY_REWARD : raw;
})();
await txFn.update(users)
.set({
balance: sql`${users.balance} + ${totalReward}`,