Fix copy not loading. Send publish message only one

This commit is contained in:
Reckless_Satoshi 2022-03-11 07:40:04 -08:00
parent 6373957774
commit 8001e148d7
No known key found for this signature in database
GPG Key ID: 9C4585B561315571
3 changed files with 5 additions and 3 deletions

View File

@ -4,6 +4,7 @@ from api.lightning.node import LNNode
from api.tasks import follow_send_payment
from api.models import LNPayment, Order
from api.logics import Logics
from api.tasks import send_message
from django.utils import timezone
from datetime import timedelta
@ -177,6 +178,7 @@ class Command(BaseCommand):
# It is a maker bond => Publish order.
if hasattr(lnpayment, "order_made"):
Logics.publish_order(lnpayment.order_made)
send_message.delay(lnpayment.order_made.id,'order_published')
return
# It is a taker bond => close contract.
@ -194,7 +196,7 @@ class Command(BaseCommand):
self.stdout.write(str(e))
# If the LNPayment goes to CANCEL from INVGEN, the invoice had expired
# If it goes to CANCEL from LOCKED the bond was relased. Order had expired in both cases.
# If it goes to CANCEL from LOCKED the bond was unlocked. Order had expired in both cases.
# Testing needed for end of time trades!
if lnpayment.status == LNPayment.Status.CANCEL:
if hasattr(lnpayment, "order_made"):

View File

@ -1,5 +1,5 @@
import React, { Component } from "react";
import { IconButton, Paper, Rating, Button, CircularProgress, Grid, Typography, TextField, List, ListItem, ListItemText, Divider, ListItemIcon, Dialog, DialogActions, DialogContent, DialogContentText, DialogTitle} from "@mui/material"
import { IconButton, 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"

File diff suppressed because one or more lines are too long