From b76d40a08770e217fe9fa8a7cbb0b89447464264 Mon Sep 17 00:00:00 2001 From: KoalaSat Date: Tue, 25 Jun 2024 15:26:57 +0200 Subject: [PATCH] Fix custom Coordinator error --- frontend/src/basic/SettingsPage/index.tsx | 2 +- frontend/src/contexts/FederationContext.tsx | 9 +++++++-- frontend/static/locales/ca.json | 2 +- frontend/static/locales/cs.json | 2 +- frontend/static/locales/de.json | 2 +- frontend/static/locales/en.json | 2 +- frontend/static/locales/es.json | 2 +- frontend/static/locales/eu.json | 2 +- frontend/static/locales/fr.json | 2 +- frontend/static/locales/it.json | 2 +- frontend/static/locales/ja.json | 2 +- frontend/static/locales/pl.json | 2 +- frontend/static/locales/pt.json | 2 +- frontend/static/locales/ru.json | 2 +- frontend/static/locales/sv.json | 2 +- frontend/static/locales/sw.json | 2 +- frontend/static/locales/th.json | 2 +- frontend/static/locales/zh-SI.json | 2 +- frontend/static/locales/zh-TR.json | 2 +- 19 files changed, 25 insertions(+), 20 deletions(-) diff --git a/frontend/src/basic/SettingsPage/index.tsx b/frontend/src/basic/SettingsPage/index.tsx index 3f2c339c..26d4fa3c 100644 --- a/frontend/src/basic/SettingsPage/index.tsx +++ b/frontend/src/basic/SettingsPage/index.tsx @@ -25,7 +25,7 @@ const SettingsPage = (): JSX.Element => { setNewAlias(''); setNewUrl(''); } else { - setError(t('Invalid URL')); + setError(t('Invalid Onion URL')); } } }; diff --git a/frontend/src/contexts/FederationContext.tsx b/frontend/src/contexts/FederationContext.tsx index 4946ac7c..06bd1a62 100644 --- a/frontend/src/contexts/FederationContext.tsx +++ b/frontend/src/contexts/FederationContext.tsx @@ -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; @@ -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]; diff --git a/frontend/static/locales/ca.json b/frontend/static/locales/ca.json index 26d7a77e..284e4221 100644 --- a/frontend/static/locales/ca.json +++ b/frontend/static/locales/ca.json @@ -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", diff --git a/frontend/static/locales/cs.json b/frontend/static/locales/cs.json index ad482535..1ca2f9fe 100644 --- a/frontend/static/locales/cs.json +++ b/frontend/static/locales/cs.json @@ -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", diff --git a/frontend/static/locales/de.json b/frontend/static/locales/de.json index 7a410045..d8cd0975 100644 --- a/frontend/static/locales/de.json +++ b/frontend/static/locales/de.json @@ -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", diff --git a/frontend/static/locales/en.json b/frontend/static/locales/en.json index fd1ca25d..efb540b1 100644 --- a/frontend/static/locales/en.json +++ b/frontend/static/locales/en.json @@ -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", diff --git a/frontend/static/locales/es.json b/frontend/static/locales/es.json index 39020c2a..831c26c8 100644 --- a/frontend/static/locales/es.json +++ b/frontend/static/locales/es.json @@ -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", diff --git a/frontend/static/locales/eu.json b/frontend/static/locales/eu.json index 6b319a41..8b0c0be1 100644 --- a/frontend/static/locales/eu.json +++ b/frontend/static/locales/eu.json @@ -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", diff --git a/frontend/static/locales/fr.json b/frontend/static/locales/fr.json index 16fee4f4..2ebe3a5c 100644 --- a/frontend/static/locales/fr.json +++ b/frontend/static/locales/fr.json @@ -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", diff --git a/frontend/static/locales/it.json b/frontend/static/locales/it.json index bb4c8994..3a480031 100644 --- a/frontend/static/locales/it.json +++ b/frontend/static/locales/it.json @@ -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", diff --git a/frontend/static/locales/ja.json b/frontend/static/locales/ja.json index 3e5a32d5..fa8e4c56 100644 --- a/frontend/static/locales/ja.json +++ b/frontend/static/locales/ja.json @@ -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ネットワークに接続しました", diff --git a/frontend/static/locales/pl.json b/frontend/static/locales/pl.json index 987030c4..37d5960f 100644 --- a/frontend/static/locales/pl.json +++ b/frontend/static/locales/pl.json @@ -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", diff --git a/frontend/static/locales/pt.json b/frontend/static/locales/pt.json index d4cdcb37..b5964d11 100644 --- a/frontend/static/locales/pt.json +++ b/frontend/static/locales/pt.json @@ -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", diff --git a/frontend/static/locales/ru.json b/frontend/static/locales/ru.json index dabfbfc2..965bc536 100644 --- a/frontend/static/locales/ru.json +++ b/frontend/static/locales/ru.json @@ -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", diff --git a/frontend/static/locales/sv.json b/frontend/static/locales/sv.json index 9236ad47..ae6995d9 100644 --- a/frontend/static/locales/sv.json +++ b/frontend/static/locales/sv.json @@ -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", diff --git a/frontend/static/locales/sw.json b/frontend/static/locales/sw.json index 918fad5a..11ec90bd 100644 --- a/frontend/static/locales/sw.json +++ b/frontend/static/locales/sw.json @@ -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", diff --git a/frontend/static/locales/th.json b/frontend/static/locales/th.json index e193d732..39e5a252 100644 --- a/frontend/static/locales/th.json +++ b/frontend/static/locales/th.json @@ -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", diff --git a/frontend/static/locales/zh-SI.json b/frontend/static/locales/zh-SI.json index ab1bd8f8..6a72253b 100644 --- a/frontend/static/locales/zh-SI.json +++ b/frontend/static/locales/zh-SI.json @@ -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 网络", diff --git a/frontend/static/locales/zh-TR.json b/frontend/static/locales/zh-TR.json index c0e92b84..139d39a5 100644 --- a/frontend/static/locales/zh-TR.json +++ b/frontend/static/locales/zh-TR.json @@ -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 網絡",