mirror of
https://github.com/RoboSats/robosats.git
synced 2025-01-18 20:21:35 +00:00
host fixed
This commit is contained in:
parent
1cbab240ca
commit
0cf88efb6c
@ -10,8 +10,6 @@ import Notifications from '../components/Notifications';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { GarageContext, type UseGarageStoreType } from '../contexts/GarageContext';
|
||||
|
||||
//const Router = window.NativeRobosats === undefined ? BrowserRouter : MemoryRouter;
|
||||
|
||||
const Router = (window.NativeRobosats === undefined && window.DesktopRobosats === undefined)? BrowserRouter : window.DesktopRobosats === 'Desktop-App' ? HashRouter : MemoryRouter;
|
||||
|
||||
const TestnetTypography = styled(Typography)({
|
||||
|
@ -73,7 +73,7 @@ const RobotAvatar: React.FC<Props> = ({
|
||||
if (shortAlias !== undefined) {
|
||||
if (window.NativeRobosats === undefined) {
|
||||
setAvatarSrc(
|
||||
`${hostUrl.substring(hostUrl.indexOf("http://")+7)}/static/federation/avatars/${shortAlias}${small ? '.small' : ''}.webp`,
|
||||
`${hostUrl}/static/federation/avatars/${shortAlias}${small ? '.small' : ''}.webp`,
|
||||
);
|
||||
} else {
|
||||
setAvatarSrc(
|
||||
|
@ -89,7 +89,7 @@ const getHostUrl = (network = 'mainnet'): string => {
|
||||
host = defaultFederation.exp[network]['onion'];
|
||||
protocol = 'http:';
|
||||
}
|
||||
const hostUrl = `${protocol}//${host}`;
|
||||
const hostUrl = `${host}`;
|
||||
return hostUrl;
|
||||
};
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
// eslint-disable-next-line @typescript-eslint/explicit-function-return-type
|
||||
export const getWorldmapGeojson = async (apiClient, baseUrl) => {
|
||||
return apiClient.get(baseUrl.substring(baseUrl.indexOf("http://")+7), '/static/assets/geo/countries-coastline-10km.geo.json');
|
||||
return apiClient.get(baseUrl, '/static/assets/geo/countries-coastline-10km.geo.json');
|
||||
};
|
||||
|
||||
export default getWorldmapGeojson;
|
||||
|
@ -21,7 +21,7 @@ export class Federation {
|
||||
// Do not add `Local Dev` unless it is running on localhost
|
||||
return acc;
|
||||
} else {
|
||||
acc[key] = new Coordinator(value, origin, settings, hostUrl.substring(hostUrl.indexOf("http://")+7));
|
||||
acc[key] = new Coordinator(value, origin, settings, hostUrl);
|
||||
|
||||
return acc;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user