import React, { Component } from "react"; import { Paper, FormControl , Grid, Typography, FormHelperText, TextField, List, ListItem, ListItemText, Divider} from "@material-ui/core" import QRCode from "react-qr-code" export default class TradeBox extends Component { constructor(props) { super(props); this.data = this.props.data } showInvoice=()=>{ return ( Robots around here usually show commitment {this.data.isMaker ? Lock {this.data.bondSatoshis} Sats to PUBLISH order : Lock {this.data.bondSatoshis} Sats to TAKE the order } ); } showEscrowInvoice=()=>{ return ( Deposit {this.data.escrowSatoshis} Sats as trade collateral ); } showMakerWait=()=>{ return ( Your order is public, wait for a taker.

Be patient while robots check the book. It might take some time. This box will ring 🔊 once a robot takes your order.

Please note that if your premium is too high, or if your currency or payment methods are not popular, your order might expire untaken. Your bond will return to you (no action needed).

{/* TODO API sends data for a more confortable wait */}
) } render() { return ( TradeBox {this.data.bondInvoice ? this.showInvoice() : ""} {this.data.isMaker & this.data.statusCode == 1 ? this.showMakerWait() : ""} {this.data.isSeller & this.data.escrowInvoice != null ? this.showEscrowInvoice() : ""} ); } }