-
Notifications
You must be signed in to change notification settings - Fork 0
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
base: main
Are you sure you want to change the base?
Conversation
envs/.env.init.example
Outdated
@@ -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"}}' |
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.
what is the advantage of having this data in an env variable instead of a constants file?
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 guess it allows easily defining different values for different environments. Also, there's no need for opening additional PRs when a change happens.
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 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
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.
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
envs/.env.init.example
Outdated
@@ -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"}}' |
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.
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
Expanded domain metadata with
iconURL
andexplorerURL
. Updated the schema accordingly.closes #24