Skip to content
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

Merged
merged 2 commits into from
Nov 16, 2023
Merged

Conversation

swimricky
Copy link
Contributor

No description provided.

Copy link

vercel bot commented Nov 15, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
grant-program ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 16, 2023 1:12pm
grant-program-devnet ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 16, 2023 1:12pm

const entryGen = claimInfoMap.entries()
let entry = entryGen.next()
const doubleClaimEntries: Array<[string, Set<FormattedTxnEventInfo>]> = []
while (!entry.done) {
Copy link
Contributor

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>>()
Copy link
Contributor

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

Copy link
Contributor Author

@swimricky swimricky Nov 16, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants