-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
SUPPORTED_CHAINS ENV var #1900
SUPPORTED_CHAINS ENV var #1900
Conversation
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 kinda complicates local development, doesn't it?
I think that some kind of default list should be present in the code, so that it is possible to run the app server with only actually local configuration (i.e. node/db credentials)
Pull Request Test Coverage Report for Build 2be3a366-52b7-4da6-b426-e1329df72978
💛 - Coveralls |
@@ -96,7 +96,11 @@ defmodule BlockScoutWeb.LayoutView do | |||
|
|||
def other_networks do | |||
:block_scout_web | |||
|> Application.get_env(:other_networks, []) | |||
|> Application.get_env(:other_networks) | |||
|> Poison.decode!() |
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.
Yeah, I think just adding a
|> Kernel.||(@default_other_networks)
would be good for those that don't want to customize this list.
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.
Small piece of feedback, but otherwise 👍
@zachdaniel @goodsoft tnx for comments. I added the fallback to |
Missing tests were added |
Closes #1899
Motivation
We have no ability to manage supported chains list without redeploying the application
Changelog
Enhancements
A new ENV var SUPPORTED_CHAINS has been added. It represents a minified array of JSON objects
and the minified version:
@default_other_networks
has been added to be able to run without ENV varhide_in_dropdown
has been added to the chain JSON object to support hiding of chain in the dropdown list whereas keeping it in the footerThe list of ENV vars updated https://forum.poa.network/t/faq-environment-variables/1814
Checklist for your PR
CHANGELOG.md
with this PR