diff --git a/packages/suite-desktop-core/src/modules/tor.ts b/packages/suite-desktop-core/src/modules/tor.ts index 547f6b2fdf38..d9b8bd5449d0 100644 --- a/packages/suite-desktop-core/src/modules/tor.ts +++ b/packages/suite-desktop-core/src/modules/tor.ts @@ -30,10 +30,10 @@ const load = async ({ mainWindowProxy, store, mainThreadEmitter }: Dependencies) const settings = store.getTorSettings(); - const implementations = [ + const processes = [ { type: 'tor', - impl: new TorProcess({ + process: new TorProcess({ host: settings.host, port: settings.port, controlPort: settings.controlPort, @@ -43,14 +43,14 @@ const load = async ({ mainWindowProxy, store, mainThreadEmitter }: Dependencies) }, { type: 'tor-external', - impl: new TorExternalProcess(), + process: new TorExternalProcess(), }, ]; const getTarget = () => { const { useExternalTor } = store.getTorSettings(); const currentTarget = useExternalTor ? 'tor-external' : 'tor'; - return implementations.find(impl => impl.type === currentTarget)!.impl; + return processes.find(process => process.type === currentTarget)!.process; }; const updateTorPort = (port: number) => { @@ -120,8 +120,9 @@ const load = async ({ mainWindowProxy, store, mainThreadEmitter }: Dependencies) const createFakeBootstrapProcess = () => { let progress = 0; - const duration = 3 * 1000; // 3 seconds. - const interval = 300; // update progress every 300ms + const duration = 3_000; + // update progress every 300ms. + const interval = 300; const increment = (100 / duration) * interval; const intervalId = setInterval(() => {