Skip to content

Rewards: Use core config to get amounts, refactor a bit to allow partial success#60

Merged
rickyrombo merged 3 commits intomainfrom
mjp-rewards-8
May 1, 2025
Merged

Rewards: Use core config to get amounts, refactor a bit to allow partial success#60
rickyrombo merged 3 commits intomainfrom
mjp-rewards-8

Conversation

@rickyrombo
Copy link
Copy Markdown
Contributor

  • get reward amounts from core config
  • use a waitgroup instead of error group to allow for all the goroutines to finish and partially succeed
  • use struct embedding to include handle/userBank in the claim struct
  • change response structure to a list or challenges with their signatures or errors

Copy link
Copy Markdown
Member

@raymondjacobson raymondjacobson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

noiiice

Comment thread api/v1_claim_rewards.go
}, nil
}

func getReward(rewardId string, rewardsList []rewards.Reward) (rewards.Reward, error) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you could preload these into a map instead 🤷

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

list small, should be fineee

Base automatically changed from mjp-rewards-7 to main May 1, 2025 23:43
@rickyrombo rickyrombo merged commit c664a32 into main May 1, 2025
2 checks passed
@rickyrombo rickyrombo deleted the mjp-rewards-8 branch May 1, 2025 23:47
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