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

Fix custom Coordinator error #1352

Merged
merged 1 commit into from
Jun 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion frontend/src/basic/SettingsPage/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const SettingsPage = (): JSX.Element => {
setNewAlias('');
setNewUrl('');
} else {
setError(t('Invalid URL'));
setError(t('Invalid Onion URL'));
}
}
};
Expand Down
9 changes: 7 additions & 2 deletions frontend/src/contexts/FederationContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import { federationLottery } from '../utils';
import { AppContext, type UseAppStoreType } from './AppContext';
import { GarageContext, type UseGarageStoreType } from './GarageContext';
import NativeRobosats from '../services/Native';
import { Origins } from '../models/Coordinator.model';

// Refresh delays (ms) according to Order status
const defaultDelay = 5000;
Expand Down Expand Up @@ -175,9 +176,13 @@ export const FederationContextProvider = ({
enabled: true,
};
if (settings.network === 'mainnet') {
attributes.mainnet = url;
attributes.mainnet = {
onion: url,
} as Origins;
} else {
attributes.testnet = url;
attributes.testnet = {
onion: url,
} as Origins;
}
federation.addCoordinator(origin, settings, hostUrl, attributes);
const newCoordinator = federation.coordinators[alias];
Expand Down
2 changes: 1 addition & 1 deletion frontend/static/locales/ca.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
"Add": "Add",
"Alias": "Alias",
"Alias already exists": "Alias already exists",
"Invalid URL": "Invalid URL",
"Invalid Onion URL": "Invalid Onion URL",
"URL": "URL",
"#14": "Phrases in components/TorConnection.tsx",
"Connected to TOR network": "Connectat a la xarxa TOR",
Expand Down
2 changes: 1 addition & 1 deletion frontend/static/locales/cs.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
"Add": "Add",
"Alias": "Alias",
"Alias already exists": "Alias already exists",
"Invalid URL": "Invalid URL",
"Invalid Onion URL": "Invalid Onion URL",
"URL": "URL",
"#14": "Phrases in components/TorConnection.tsx",
"Connected to TOR network": "Connected to TOR network",
Expand Down
2 changes: 1 addition & 1 deletion frontend/static/locales/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
"Add": "Add",
"Alias": "Alias",
"Alias already exists": "Alias already exists",
"Invalid URL": "Invalid URL",
"Invalid Onion URL": "Invalid Onion URL",
"URL": "URL",
"#14": "Phrases in components/TorConnection.tsx",
"Connected to TOR network": "Connected to TOR network",
Expand Down
2 changes: 1 addition & 1 deletion frontend/static/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
"Add": "Add",
"Alias": "Alias",
"Alias already exists": "Alias already exists",
"Invalid URL": "Invalid URL",
"Invalid Onion URL": "Invalid Onion URL",
"URL": "URL",
"#14": "Phrases in components/TorConnection.tsx",
"Connected to TOR network": "Connected to TOR network",
Expand Down
2 changes: 1 addition & 1 deletion frontend/static/locales/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
"Add": "Add",
"Alias": "Alias",
"Alias already exists": "Alias already exists",
"Invalid URL": "Invalid URL",
"Invalid Onion URL": "Invalid Onion URL",
"URL": "URL",
"#14": "Phrases in components/TorConnection.tsx",
"Connected to TOR network": "Conectado a la red TOR",
Expand Down
2 changes: 1 addition & 1 deletion frontend/static/locales/eu.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
"Add": "Add",
"Alias": "Alias",
"Alias already exists": "Alias already exists",
"Invalid URL": "Invalid URL",
"Invalid Onion URL": "Invalid Onion URL",
"URL": "URL",
"#14": "Phrases in components/TorConnection.tsx",
"Connected to TOR network": "Connected to TOR network",
Expand Down
2 changes: 1 addition & 1 deletion frontend/static/locales/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
"Add": "Add",
"Alias": "Alias",
"Alias already exists": "Alias already exists",
"Invalid URL": "Invalid URL",
"Invalid Onion URL": "Invalid Onion URL",
"URL": "URL",
"#14": "Phrases in components/TorConnection.tsx",
"Connected to TOR network": "Connecté au réseau TOR",
Expand Down
2 changes: 1 addition & 1 deletion frontend/static/locales/it.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
"Add": "Add",
"Alias": "Alias",
"Alias already exists": "Alias already exists",
"Invalid URL": "Invalid URL",
"Invalid Onion URL": "Invalid Onion URL",
"URL": "URL",
"#14": "Phrases in components/TorConnection.tsx",
"Connected to TOR network": "Connesso alla rete TOR",
Expand Down
2 changes: 1 addition & 1 deletion frontend/static/locales/ja.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
"Add": "Add",
"Alias": "Alias",
"Alias already exists": "Alias already exists",
"Invalid URL": "Invalid URL",
"Invalid Onion URL": "Invalid Onion URL",
"URL": "URL",
"#14": "Phrases in components/TorConnection.tsx",
"Connected to TOR network": "TORネットワークに接続しました",
Expand Down
2 changes: 1 addition & 1 deletion frontend/static/locales/pl.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
"Add": "Add",
"Alias": "Alias",
"Alias already exists": "Alias already exists",
"Invalid URL": "Invalid URL",
"Invalid Onion URL": "Invalid Onion URL",
"URL": "URL",
"#14": "Phrases in components/TorConnection.tsx",
"Connected to TOR network": "Connected to TOR network",
Expand Down
2 changes: 1 addition & 1 deletion frontend/static/locales/pt.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
"Add": "Add",
"Alias": "Alias",
"Alias already exists": "Alias already exists",
"Invalid URL": "Invalid URL",
"Invalid Onion URL": "Invalid Onion URL",
"URL": "URL",
"#14": "Phrases in components/TorConnection.tsx",
"Connected to TOR network": "Conectado à rede TOR",
Expand Down
2 changes: 1 addition & 1 deletion frontend/static/locales/ru.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
"Add": "Add",
"Alias": "Alias",
"Alias already exists": "Alias already exists",
"Invalid URL": "Invalid URL",
"Invalid Onion URL": "Invalid Onion URL",
"URL": "URL",
"#14": "Phrases in components/TorConnection.tsx",
"Connected to TOR network": "Подключено к сети TOR",
Expand Down
2 changes: 1 addition & 1 deletion frontend/static/locales/sv.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
"Add": "Add",
"Alias": "Alias",
"Alias already exists": "Alias already exists",
"Invalid URL": "Invalid URL",
"Invalid Onion URL": "Invalid Onion URL",
"URL": "URL",
"#14": "Phrases in components/TorConnection.tsx",
"Connected to TOR network": "Connected to TOR network",
Expand Down
2 changes: 1 addition & 1 deletion frontend/static/locales/sw.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
"Add": "Add",
"Alias": "Alias",
"Alias already exists": "Alias already exists",
"Invalid URL": "Invalid URL",
"Invalid Onion URL": "Invalid Onion URL",
"URL": "URL",
"#14": "Phrases in components/TorConnection.tsx",
"Connected to TOR network": "Kuunganishwa kwa mtandao wa TOR",
Expand Down
2 changes: 1 addition & 1 deletion frontend/static/locales/th.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
"Add": "Add",
"Alias": "Alias",
"Alias already exists": "Alias already exists",
"Invalid URL": "Invalid URL",
"Invalid Onion URL": "Invalid Onion URL",
"URL": "URL",
"#14": "Phrases in components/TorConnection.tsx",
"Connected to TOR network": "Connected to TOR network",
Expand Down
2 changes: 1 addition & 1 deletion frontend/static/locales/zh-SI.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
"Add": "Add",
"Alias": "Alias",
"Alias already exists": "Alias already exists",
"Invalid URL": "Invalid URL",
"Invalid Onion URL": "Invalid Onion URL",
"URL": "URL",
"#14": "Phrases in components/TorConnection.tsx",
"Connected to TOR network": "已连线 TOR 网络",
Expand Down
2 changes: 1 addition & 1 deletion frontend/static/locales/zh-TR.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
"Add": "Add",
"Alias": "Alias",
"Alias already exists": "Alias already exists",
"Invalid URL": "Invalid URL",
"Invalid Onion URL": "Invalid Onion URL",
"URL": "URL",
"#14": "Phrases in components/TorConnection.tsx",
"Connected to TOR network": "已連線 TOR 網絡",
Expand Down