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

resolve circular deps inside rewards #1348

Merged
merged 2 commits into from
Jul 3, 2024

Conversation

dominik-stumpf
Copy link
Contributor

Fixes 2 circular dependency group

  • fix(SecretText): resolve circular dependency inside rewards
  • fix(PolygonID): resolve circular dependency inside rewards

Copy link

vercel bot commented Jul 3, 2024

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

Name Status Preview Comments Updated (UTC)
guild-xyz ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 3, 2024 5:39pm

Copy link
Collaborator

@BrickheadJohnny BrickheadJohnny left a comment

Choose a reason for hiding this comment

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

I had 2 questions, let's discuss them 😉

@@ -0,0 +1,5 @@
export type SecretTextRewardForm = {
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm not sure if we need to put these types in a types.ts close to the components where we actually use them, or we should just put them in the main src/types.ts file. What are the pros and cons in your opinion?

Copy link
Contributor Author

@dominik-stumpf dominik-stumpf Jul 3, 2024

Choose a reason for hiding this comment

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

Pros:

  • The src/types.ts won't grow unmaintainably (name collision, too large file, uncertain types)
  • The types will be localized in some sense
  • This way it's clear that the types.ts belongs to SecretText from every import, this gives the type additional data for the developers.

Cons:

  • More files
  • Global types don't require imports, as this one does so when something is renamed or moved, more refactor is required usually

I plan to write about these in the project structure convention, this is not something we do in the project now.

@dominik-stumpf dominik-stumpf merged commit 6331876 into main Jul 3, 2024
3 checks passed
@dominik-stumpf dominik-stumpf deleted the resolve-circular-deps-inside-rewards branch July 3, 2024 20:03
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