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

chore: Add domain metadata #32

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open

chore: Add domain metadata #32

wants to merge 8 commits into from

Conversation

mj52951
Copy link
Collaborator

@mj52951 mj52951 commented Dec 11, 2024

Expanded domain metadata with iconURL and explorerURL. Updated the schema accordingly.

closes #24

@@ -8,3 +8,4 @@ DB_HOST=db
START_SCRIPT_ENV=init

SHARED_CONFIG_URL=
SYG_CHAINS='{"1": {"iconUrl": "https://example.com/icon1.png", "explorerUrl": "https://explorer.com/1"}, "2": {"iconUrl": "https://example.com/icon2.png", "explorerUrl": "https://explorer.com/2"}}'
Copy link
Member

Choose a reason for hiding this comment

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

what is the advantage of having this data in an env variable instead of a constants file?

Copy link
Collaborator Author

@mj52951 mj52951 Dec 11, 2024

Choose a reason for hiding this comment

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

I guess it allows easily defining different values for different environments. Also, there's no need for opening additional PRs when a change happens.

cc @tcar121293 @MakMuftic

Copy link
Member

Choose a reason for hiding this comment

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

this is handy when we would be changing these values often and supposed to be a secret as well, but it doesn't seem like its gonna be like that

Copy link
Contributor

Choose a reason for hiding this comment

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

Whenever we add or remove a new domain, we would need to change this configuration, and we would then need to release a new version of api. If we have it in env variable, we can just update the env variable and restart the server

@@ -8,3 +8,4 @@ DB_HOST=db
START_SCRIPT_ENV=init

SHARED_CONFIG_URL=
SYG_CHAINS='{"1": {"iconUrl": "https://example.com/icon1.png", "explorerUrl": "https://explorer.com/1"}, "2": {"iconUrl": "https://example.com/icon2.png", "explorerUrl": "https://explorer.com/2"}}'
Copy link
Contributor

Choose a reason for hiding this comment

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

Whenever we add or remove a new domain, we would need to change this configuration, and we would then need to release a new version of api. If we have it in env variable, we can just update the env variable and restart the server

src/indexer/config/validator.ts Outdated Show resolved Hide resolved
@mj52951 mj52951 marked this pull request as draft December 13, 2024 08:48
@mj52951 mj52951 marked this pull request as ready for review December 17, 2024 13:13
@mj52951 mj52951 requested a review from tcar121293 December 17, 2024 13:14
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.

Store Icon and Explorer URL in Database
3 participants