Fix payout calculation - update defaults and add debug logging

This commit is contained in:
jwinterm
2025-12-24 21:00:22 -05:00
parent b062a1a5fa
commit f1c86a084b
2 changed files with 8 additions and 4 deletions
+5 -3
View File
@@ -49,11 +49,11 @@ const DEFAULT_CONFIG = Object.freeze({
credits: {
enabled: false,
multipliers: {
escape: 1.5,
escapeWithTreasure: 2.0,
escape: 2.0,
escapeWithTreasure: 3.0,
perfectRun: 3.0
},
baseValue: 50000000000n,
baseValue: 100000000000n,
minPayout: 1000000000n,
maxPayout: 5000000000000n
}
@@ -286,9 +286,11 @@ class PaymentConfigManager {
if (creditsPayoutEnabled !== undefined) {
config.payouts.rules.credits.enabled = creditsPayoutEnabled;
}
console.log(`🔧 ENV CREDITS_PAYOUT_BASE = "${process.env.CREDITS_PAYOUT_BASE}" (raw)`);
config.payouts.rules.credits.multipliers.escape = parseFloatValue(process.env.CREDITS_PAYOUT_ESCAPE, config.payouts.rules.credits.multipliers.escape);
config.payouts.rules.credits.multipliers.escapeWithTreasure = parseFloatValue(process.env.CREDITS_PAYOUT_TREASURE, config.payouts.rules.credits.multipliers.escapeWithTreasure);
config.payouts.rules.credits.baseValue = parseAtomicValue(process.env.CREDITS_PAYOUT_BASE, config.payouts.rules.credits.baseValue);
console.log(`🔧 Parsed credits baseValue = ${config.payouts.rules.credits.baseValue}`);
config.payouts.processing.batchInterval = parseInteger(process.env.PAYOUT_BATCH_INTERVAL, config.payouts.processing.batchInterval);
config.payouts.processing.maxRetries = parseInteger(process.env.PAYOUT_MAX_RETRIES, config.payouts.processing.maxRetries);