mirror of
https://github.com/RoboSats/robosats.git
synced 2025-09-07 16:25:01 +00:00
Fix settings save
This commit is contained in:
@ -43,13 +43,11 @@ class BaseSettings {
|
|||||||
: i18n.resolvedLanguage.substring(0, 2);
|
: i18n.resolvedLanguage.substring(0, 2);
|
||||||
|
|
||||||
const networkCookie = systemClient.getItem('settings_network');
|
const networkCookie = systemClient.getItem('settings_network');
|
||||||
|
|
||||||
this.network = networkCookie && networkCookie !== '' ? networkCookie : 'mainnet';
|
this.network = networkCookie && networkCookie !== '' ? networkCookie : 'mainnet';
|
||||||
this.host = getHost();
|
this.host = getHost();
|
||||||
|
|
||||||
const useProxy = systemClient.getItem('settings_use_proxy');
|
const useProxy = systemClient.getItem('settings_use_proxy');
|
||||||
this.useProxy =
|
this.useProxy = window.NativeRobosats !== undefined && useProxy !== 'false';
|
||||||
useProxy === 'true' || (useProxy !== 'false' && window.NativeRobosats !== undefined);
|
|
||||||
|
|
||||||
apiClient.useProxy = this.useProxy;
|
apiClient.useProxy = this.useProxy;
|
||||||
}
|
}
|
||||||
|
@ -28,7 +28,7 @@ class SystemNativeClient implements SystemClient {
|
|||||||
};
|
};
|
||||||
|
|
||||||
public setCookie: (key: string, value: string) => void = (key, value) => {
|
public setCookie: (key: string, value: string) => void = (key, value) => {
|
||||||
delete window.NativeRobosats?.cookies[key];
|
window.NativeRobosats?.loadCookie({ key, value });
|
||||||
void window.NativeRobosats?.postMessage({
|
void window.NativeRobosats?.postMessage({
|
||||||
category: 'system',
|
category: 'system',
|
||||||
type: 'setCookie',
|
type: 'setCookie',
|
||||||
|
@ -45,7 +45,6 @@ export default function federationLottery(federation: Federation): string[] {
|
|||||||
// federation[shortAlias] = { badges:{ donatesToDevFund }};
|
// federation[shortAlias] = { badges:{ donatesToDevFund }};
|
||||||
// }
|
// }
|
||||||
|
|
||||||
// console.log(federation)
|
|
||||||
// return federation;
|
// return federation;
|
||||||
// }
|
// }
|
||||||
|
|
||||||
@ -58,5 +57,4 @@ export default function federationLottery(federation: Federation): string[] {
|
|||||||
// results.push(rankedCoordinators);
|
// results.push(rankedCoordinators);
|
||||||
// }
|
// }
|
||||||
|
|
||||||
// console.log(results)
|
|
||||||
// }
|
// }
|
||||||
|
@ -71,6 +71,7 @@ const App = () => {
|
|||||||
loadCookie('settings_mode');
|
loadCookie('settings_mode');
|
||||||
loadCookie('settings_light_qr');
|
loadCookie('settings_light_qr');
|
||||||
loadCookie('settings_network');
|
loadCookie('settings_network');
|
||||||
|
loadCookie('settings_use_proxy');
|
||||||
loadCookie('garage_slots').then(() => injectMessageResolve(responseId));
|
loadCookie('garage_slots').then(() => injectMessageResolve(responseId));
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user