import React, { Component } from "react"; import { withTranslation, Trans} from "react-i18next"; import { IconButton, Box, Link, Paper, Rating, Button, Tooltip, CircularProgress, Grid, Typography, TextField, List, ListItem, ListItemText, Divider, ListItemIcon, Dialog, DialogActions, DialogContent, DialogContentText, DialogTitle} from "@mui/material" import QRCode from "react-qr-code"; import Countdown, { zeroPad} from 'react-countdown'; import Chat from "./Chat" import MediaQuery from 'react-responsive' import QrReader from 'react-qr-reader' // Icons import PercentIcon from '@mui/icons-material/Percent'; import BookIcon from '@mui/icons-material/Book'; import QrCodeScannerIcon from '@mui/icons-material/QrCodeScanner'; import SendIcon from '@mui/icons-material/Send'; import LockIcon from '@mui/icons-material/Lock'; import LockOpenIcon from '@mui/icons-material/LockOpen'; import BalanceIcon from '@mui/icons-material/Balance'; import ContentCopy from "@mui/icons-material/ContentCopy"; import PauseCircleIcon from '@mui/icons-material/PauseCircle'; import PlayCircleIcon from '@mui/icons-material/PlayCircle'; import AccountBalanceWalletIcon from '@mui/icons-material/AccountBalanceWallet'; import { NewTabIcon } from "./Icons"; import { getCookie } from "../utils/cookies"; import { pn } from "../utils/prettyNumbers"; class TradeBox extends Component { invoice_escrow_duration = 3; constructor(props) { super(props); this.state = { openConfirmFiatReceived: false, openConfirmDispute: false, openEnableTelegram: false, badInvoice: false, badStatement: false, qrscanner: false, } } Sound = (soundFileName) => ( // Four filenames: "locked-invoice", "taker-found", "open-chat", "successful"