import React, { Component } from 'react'; import { withTranslation, Trans } from 'react-i18next'; import { Alert, AlertTitle, ToggleButtonGroup, ToggleButton, 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 './EncryptedChat'; import TradeSummary from './TradeSummary'; import MediaQuery from 'react-responsive'; import { copyToClipboard } from '../utils/clipboard'; // Icons import PercentIcon from '@mui/icons-material/Percent'; import BookIcon from '@mui/icons-material/Book'; 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 BoltIcon from '@mui/icons-material/Bolt'; import LinkIcon from '@mui/icons-material/Link'; import AccountBalanceWalletIcon from '@mui/icons-material/AccountBalanceWallet'; import FavoriteIcon from '@mui/icons-material/Favorite'; import RocketLaunchIcon from '@mui/icons-material/RocketLaunch'; import RefreshIcon from '@mui/icons-material/Refresh'; 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, receiveTab: 0, address: '', miningFee: 1.05, badInvoice: false, badAddress: false, badStatement: false, }; } Sound = (soundFileName) => ( // Four filenames: "locked-invoice", "taker-found", "open-chat", "successful"