From 2a8e8fb4887e0e3c4977792da4fc81cf659a5f60 Mon Sep 17 00:00:00 2001 From: binarybaron <86064887+binarybaron@users.noreply.github.com> Date: Wed, 12 Jun 2024 17:01:57 +0200 Subject: [PATCH] fmt: Prettier --- src/main/cli/cli.ts | 17 ++++++++++------- src/main/updater.ts | 2 +- .../in_progress/BitcoinLockTxInMempoolPage.tsx | 3 ++- .../components/modal/updater/UpdaterDialog.tsx | 4 +++- src/renderer/index.tsx | 2 +- src/store/features/rpcSlice.ts | 4 ++-- 6 files changed, 19 insertions(+), 13 deletions(-) diff --git a/src/main/cli/cli.ts b/src/main/cli/cli.ts index b4b122a..dad78a1 100644 --- a/src/main/cli/cli.ts +++ b/src/main/cli/cli.ts @@ -8,7 +8,10 @@ import pidtree from 'pidtree'; import util from 'util'; import { getPlatform, isTestnet } from 'store/config'; import { CliLog, isCliLog } from 'models/cliModel'; -import { getLogsAndStringsFromRawFileString, getLogsFromRawFileString } from 'utils/parseUtils'; +import { + getLogsAndStringsFromRawFileString, + getLogsFromRawFileString, +} from 'utils/parseUtils'; import { store } from 'main/store/mainStore'; import { swapProcessExited } from 'store/features/swapSlice'; import { RpcProcessStateType } from 'models/rpcModel'; @@ -103,9 +106,9 @@ export async function stopCli() { export async function spawnSubcommand( subCommand: string, options: { [option: string]: string }, - onLog: ((log: (CliLog | string)[]) => unknown) | null, + onLog: ((log: (CliLog | string)[]) => unknown) | null, onExit: (code: number | null, signal: NodeJS.Signals | null) => void, - onStdOut: ((data: string) => unknown) | null, + onStdOut: ((data: string) => unknown) | null ): Promise { /* This looks bad, I know @@ -182,12 +185,12 @@ export async function spawnSubcommand( stream.setEncoding('utf8'); stream.on('data', (data: string) => { logger.debug({ subCommand, data }, `CLI stdout`); - - if(onStdOut != null) { + + if (onStdOut != null) { onStdOut(data); } - if(onLog != null) { + if (onLog != null) { const logs = getLogsAndStringsFromRawFileString(data); onLog(logs); } @@ -280,7 +283,7 @@ export async function startRPC() { isPeriodicRetrievalRunning = false; }, - null, + null ); store.dispatch(rpcInitiate()); } diff --git a/src/main/updater.ts b/src/main/updater.ts index 89751a9..6c63b17 100644 --- a/src/main/updater.ts +++ b/src/main/updater.ts @@ -23,7 +23,7 @@ export default async function initAutoUpdater() { autoUpdater.allowPrerelease = false; // This is for development purposes only. It will force the auto updater to use the dev-app-update.yml file for updates. - if(isDevelopment) { + if (isDevelopment) { autoUpdater.forceDevUpdateConfig = true; autoUpdater.allowDowngrade = true; } diff --git a/src/renderer/components/modal/swap/pages/in_progress/BitcoinLockTxInMempoolPage.tsx b/src/renderer/components/modal/swap/pages/in_progress/BitcoinLockTxInMempoolPage.tsx index 853825d..9c55d0e 100644 --- a/src/renderer/components/modal/swap/pages/in_progress/BitcoinLockTxInMempoolPage.tsx +++ b/src/renderer/components/modal/swap/pages/in_progress/BitcoinLockTxInMempoolPage.tsx @@ -26,7 +26,8 @@ export default function BitcoinLockTxInMempoolPage({ loading additionalContent={ <> - Most swap providers require one confirmation before locking their Monero + Most swap providers require one confirmation before locking their + Monero
Confirmations: {state.bobBtcLockTxConfirmations} diff --git a/src/renderer/components/modal/updater/UpdaterDialog.tsx b/src/renderer/components/modal/updater/UpdaterDialog.tsx index 6157fba..85cc36a 100644 --- a/src/renderer/components/modal/updater/UpdaterDialog.tsx +++ b/src/renderer/components/modal/updater/UpdaterDialog.tsx @@ -24,7 +24,9 @@ export default function UpdaterDialog() { } function openDownloadUrl() { - const downloadUrl = `https://github.com/UnstoppableSwap/unstoppableswap-gui/releases/tag/v${updateNotification!.version}`; + const downloadUrl = `https://github.com/UnstoppableSwap/unstoppableswap-gui/releases/tag/v${ + updateNotification!.version + }`; window.open(downloadUrl, '_blank'); hideNotification(); } diff --git a/src/renderer/index.tsx b/src/renderer/index.tsx index d303d29..f6306c6 100644 --- a/src/renderer/index.tsx +++ b/src/renderer/index.tsx @@ -56,4 +56,4 @@ async function fetchInitialData() { } fetchInitialData(); -webFrame.setZoomFactor(1.2) \ No newline at end of file +webFrame.setZoomFactor(1.2); diff --git a/src/store/features/rpcSlice.ts b/src/store/features/rpcSlice.ts index aae8496..a2d6d5d 100644 --- a/src/store/features/rpcSlice.ts +++ b/src/store/features/rpcSlice.ts @@ -88,7 +88,7 @@ export const rpcSlice = createSlice({ rpcAddLogs(slice, action: PayloadAction<(CliLog | string)[]>) { if ( slice.process.type === RpcProcessStateType.STARTED || - slice.process.type === RpcProcessStateType.LISTENING_FOR_CONNECTIONS || + slice.process.type === RpcProcessStateType.LISTENING_FOR_CONNECTIONS || slice.process.type === RpcProcessStateType.EXITED ) { const logs = action.payload; @@ -109,7 +109,7 @@ export const rpcSlice = createSlice({ progress: log.fields.progress, downloadUrl: log.fields.download_url, }; - + if (log.fields.progress === '100%') { slice.state.moneroWalletRpc.updateState = false; }