-
Notifications
You must be signed in to change notification settings - Fork 4
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
feat: add aggregation key & double claim check #261
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
const entryGen = claimInfoMap.entries() | ||
let entry = entryGen.next() | ||
const doubleClaimEntries: Array<[string, Set<FormattedTxnEventInfo>]> = [] | ||
while (!entry.done) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This feels a bit dirty, why not for let entry of claimInfoMap
function createDoubleClaimEventRequest( | ||
formattedTxnEvents: FormattedTxnEventInfo[] | ||
): v1.EventsApiCreateEventRequest[] { | ||
const claimInfoMap = new Map<string, Set<FormattedTxnEventInfo>>() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You don't need a set here, it's enough to count so a Map<string, number> is enough
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i have a set so i can capture the txn info in the datadog event. it'll be easier to investigate if this actually does get triggered
No description provided.