-
Notifications
You must be signed in to change notification settings - Fork 163
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
Add external coordinator #1297
Add external coordinator #1297
Conversation
79b84f1
to
dcf7b12
Compare
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 great Koala!
I am having a couple issues.
On localhost (127.0.0.1:8000) this PR makes the list of coordinators look like this (some are missing, including "Local dev" and should show only under this host):
Adding coordinators this way will only work on Tor Browser and Android. However, this will not work on the selfHosted app (because for it to work, a new socat bridge is needed on the node to expose that coordinator's Onion locally). Maybe we can write a condition to hide those UI elements in the selfHosted app?
I think I need to test this further before we merge :D
@@ -76,7 +77,8 @@ const FederationTable = ({ | |||
> | |||
<Grid item> | |||
<RobotAvatar | |||
shortAlias={params.row.shortAlias} | |||
shortAlias={federated ? params.row.shortAlias : undefined} | |||
hashId={federated ? undefined : params.row.shortAlias} |
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.
NIT: for external coordinators we could use their mainnet.url
instead of the shortAlias
for the hashId. This way we ensure that the avatar generated matches the URL (permanent) instead of the alias (user dependentant) therefore the avatar will always be the same for everyone who adds this coordinator.
@Reckless-Satoshi All changes done |
@@ -83,7 +79,8 @@ const SelectCoordinator: React.FC<SelectCoordinatorProps> = ({ | |||
> | |||
<Grid item> | |||
<RobotAvatar | |||
shortAlias={coordinatorAlias} | |||
shortAlias={coordinator?.federated ? coordinator.shortAlias : undefined} | |||
hashId={coordinator?.federated ? undefined : coordinator.shortAlias} |
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.
And here
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.
everything changed, thank you for noticing!
bba2ddf
to
25bd312
Compare
25bd312
to
08e2633
Compare
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 did not test once again, but I'm gonna trust it just works as intended looking at the code! 😄 🚀
What does this PR do?
Adds the option of including an external coordinator
Can be easily tested in local by removing an existing coordinator form
frontend/static/federation.json
and try to add it as external.WARNING: This PR touches all important models so it requires good testing
Checklist before merging
pip install pre-commit
, thenpre-commit install
. Pre-commit installs git hooks that automatically check the codebase. If pre-commit fails when you commit your changes, please fix the problems it points out.