This repository was archived by the owner on May 28, 2022. It is now read-only.
nits: modified monitor to handle new environments#68
Open
yourbuddyconner wants to merge 13 commits intomainfrom
Open
nits: modified monitor to handle new environments#68yourbuddyconner wants to merge 13 commits intomainfrom
yourbuddyconner wants to merge 13 commits intomainfrom
Conversation
3032634 to
65396d5
Compare
|
|
||
| this.origin = origin; | ||
| this.remotes = getNetworks().filter((m) => m != origin); | ||
| this.remotes = getReplicas(origin) |
| return networks; | ||
| } | ||
|
|
||
| function getReplicas(origin: string) { |
Member
There was a problem hiding this comment.
this is gonna be a PITA to maintain as we add more chains.
i would suggest something like
const hub = HUB[environment];
const domains = DOMAINS[environment];
if (origin === hub) {
return domains.filter(d => d !== hub);
} else {
return [hub];
}
then you only ever need to add new domains to DOMAINS.
Member
There was a problem hiding this comment.
would even be cleaner to have some better way than hard-coding HUB and DOMAINS somewhere, but better than hard-coding everything imo
d054d1a to
593899c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.