Skip to content

Commit

Permalink
Merge pull request #1352 from RoboSats/fix-custom-coordinator-error
Browse files Browse the repository at this point in the history
Fix custom Coordinator error
  • Loading branch information
KoalaSat authored Jun 25, 2024
2 parents 8168108 + b76d40a commit d72e83a
Show file tree
Hide file tree
Showing 19 changed files with 25 additions and 20 deletions.
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

0 comments on commit d72e83a

Please sign in to comment.