Conversation
| return min(max((usedUSD / capUSD) * 100.0, 0), 999) | ||
| } | ||
|
|
||
| static func extractMonthlyValueUsedUSD(from json: Any) -> Double? { |
There was a problem hiding this comment.
🔥 The Roast: This function uses local timezone (TimeZone.current) to calculate date ranges, but the Chutes API likely uses UTC. A user in PST asking for "March 2024" would get March 1st 08:00 local instead of March 1st 00:00 UTC — their query would silently return partial data.
🩹 The Fix: Use UTC timezone to match the API's expected format:
calendar.timeZone = TimeZone(identifier: "UTC") ?? TimeZone.current📏 Severity: warning
Code Review Roast 🔥Verdict: No Issues Found | Recommendation: Merge Overview
🏆 Best part: The dual quota tracking implementation is thorough. The 💀 Previous issue resolved: The TimeZone concern from the prior review has been addressed — 📊 Overall: Like finding out the bar actually restocked the good stuff — I came in ready to roast, but the code is solid. This PR adds meaningful functionality (monthly value cap tracking for Chutes) without introducing tech debt. Solid work. Files Reviewed (5 files)
|
Summary
Verification