-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Skip processing for zero or negative sale amounts #3108
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
WalkthroughThe PR modifies Changes
Sequence DiagramsequenceDiagram
participant Caller
participant trackSale
participant _trackSale
participant Logger
Caller->>trackSale: call trackSale(params)
trackSale->>_trackSale: call _trackSale(params)
rect rgb(240, 248, 255)
Note over _trackSale: New validation path
alt amount <= 0
_trackSale->>Logger: log conversion event
_trackSale-->>trackSale: return {eventName, customer: null, sale: null}
else amount > 0
Note over _trackSale: Existing currency conversion logic
_trackSale->>_trackSale: handle currency conversion
_trackSale-->>trackSale: return sale data
end
end
trackSale-->>Caller: return result
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes
Possibly related PRs
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🧰 Additional context used🧠 Learnings (2)📓 Common learnings📚 Learning: 2025-10-02T22:46:22.739ZApplied to files:
🧬 Code graph analysis (1)apps/web/lib/api/conversions/track-sale.ts (1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
🔇 Additional comments (2)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary by CodeRabbit