mirror of
https://github.com/comit-network/xmr-btc-swap.git
synced 2025-05-12 03:35:06 -04:00
feat(cli+tauri): Send logs from host to guest (#90)
* feat(tauri): send logs from cli to tauri --------- Co-authored-by: binarybaron <binarybaron@unstoppableswap.net> Co-authored-by: binarybaron <86064887+binarybaron@users.noreply.github.com>
This commit is contained in:
parent
21608ce4f7
commit
7b79ad6abe
14 changed files with 206 additions and 136 deletions
|
@ -3,7 +3,7 @@ import FolderOpenIcon from "@material-ui/icons/FolderOpen";
|
|||
import PlayArrowIcon from "@material-ui/icons/PlayArrow";
|
||||
import StopIcon from "@material-ui/icons/Stop";
|
||||
import PromiseInvokeButton from "renderer/components/PromiseInvokeButton";
|
||||
import { useIsContextAvailable } from "store/hooks";
|
||||
import { useAppSelector, useIsContextAvailable } from "store/hooks";
|
||||
import InfoBox from "../../modal/swap/InfoBox";
|
||||
import CliLogsBox from "../../other/RenderedCliLog";
|
||||
|
||||
|
@ -18,17 +18,16 @@ const useStyles = makeStyles((theme) => ({
|
|||
export default function RpcControlBox() {
|
||||
const isRunning = useIsContextAvailable();
|
||||
const classes = useStyles();
|
||||
const logs = useAppSelector((s) => s.rpc.logs);
|
||||
|
||||
return (
|
||||
<InfoBox
|
||||
title={`Daemon Controller`}
|
||||
mainContent={
|
||||
isRunning ? (
|
||||
<CliLogsBox
|
||||
label="Swap Daemon Logs (current session only)"
|
||||
logs={[]}
|
||||
/>
|
||||
) : null
|
||||
<CliLogsBox
|
||||
label="Swap Daemon Logs (current session only)"
|
||||
logs={logs}
|
||||
/>
|
||||
}
|
||||
additionalContent={
|
||||
<Box className={classes.actionsOuter}>
|
||||
|
|
|
@ -3,7 +3,7 @@ import SendIcon from "@material-ui/icons/Send";
|
|||
import { RpcMethod } from "models/rpcModel";
|
||||
import { useState } from "react";
|
||||
import { SatsAmount } from "renderer/components/other/Units";
|
||||
import { useAppSelector, useIsRpcEndpointBusy } from "store/hooks";
|
||||
import { useAppSelector } from "store/hooks";
|
||||
import BitcoinIcon from "../../icons/BitcoinIcon";
|
||||
import InfoBox from "../../modal/swap/InfoBox";
|
||||
import WithdrawDialog from "../../modal/wallet/WithdrawDialog";
|
||||
|
@ -20,7 +20,6 @@ const useStyles = makeStyles((theme) => ({
|
|||
export default function WithdrawWidget() {
|
||||
const classes = useStyles();
|
||||
const walletBalance = useAppSelector((state) => state.rpc.state.balance);
|
||||
const checkingBalance = useIsRpcEndpointBusy(RpcMethod.GET_BTC_BALANCE);
|
||||
const [showDialog, setShowDialog] = useState(false);
|
||||
|
||||
function onShowDialog() {
|
||||
|
@ -50,7 +49,7 @@ export default function WithdrawWidget() {
|
|||
size="large"
|
||||
onClick={onShowDialog}
|
||||
disabled={
|
||||
walletBalance === null || checkingBalance || walletBalance <= 0
|
||||
walletBalance === null || walletBalance <= 0
|
||||
}
|
||||
>
|
||||
Withdraw
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue