Skip to content
This repository has been archived by the owner on Jan 6, 2025. It is now read-only.

Commit

Permalink
fmt: Prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
binarybaron committed Jun 12, 2024
1 parent 58ca101 commit 2a8e8fb
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 13 deletions.
17 changes: 10 additions & 7 deletions src/main/cli/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -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<ChildProcessWithoutNullStreams> {
/*
This looks bad, I know
Expand Down Expand Up @@ -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);
}
Expand Down Expand Up @@ -280,7 +283,7 @@ export async function startRPC() {

isPeriodicRetrievalRunning = false;
},
null,
null
);
store.dispatch(rpcInitiate());
}
2 changes: 1 addition & 1 deletion src/main/updater.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
<br />
Confirmations: {state.bobBtcLockTxConfirmations}
</>
Expand Down
4 changes: 3 additions & 1 deletion src/renderer/components/modal/updater/UpdaterDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,4 @@ async function fetchInitialData() {
}

fetchInitialData();
webFrame.setZoomFactor(1.2)
webFrame.setZoomFactor(1.2);
4 changes: 2 additions & 2 deletions src/store/features/rpcSlice.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
}
Expand Down

0 comments on commit 2a8e8fb

Please sign in to comment.