diff --git a/api/management/commands/follow_invoices.py b/api/management/commands/follow_invoices.py index c88ee749..eaa36601 100644 --- a/api/management/commands/follow_invoices.py +++ b/api/management/commands/follow_invoices.py @@ -5,7 +5,6 @@ from api.models import LNPayment, Order from api.logics import Logics from django.utils import timezone -from datetime import timedelta from decouple import config from base64 import b64decode import time diff --git a/api/models.py b/api/models.py index 01ef8117..942d811a 100644 --- a/api/models.py +++ b/api/models.py @@ -19,7 +19,7 @@ BOND_SIZE = float(config('BOND_SIZE')) class Currency(models.Model): - currency_dict = json.load(open('./frontend/static/assets/currencies.json')) + currency_dict = json.load(open('frontend/static/assets/currencies.json')) currency_choices = [(int(val), label) for val, label in list(currency_dict.items())] currency = models.PositiveSmallIntegerField(choices=currency_choices, null=False, unique=True) @@ -175,7 +175,7 @@ class Order(models.Model): 8 : 60*int(config('INVOICE_AND_ESCROW_DURATION')), # 'Waiting only for buyer invoice' 9 : 60*60*int(config('FIAT_EXCHANGE_DURATION')), # 'Sending fiat - In chatroom' 10 : 60*60*int(config('FIAT_EXCHANGE_DURATION')), # 'Fiat sent - In chatroom' - 11 : 1*24*60*60, # 'In dispute' + 11 : 1*24*60*60, # 'In dispute' 12 : 0, # 'Collaboratively cancelled' 13 : 24*60*60, # 'Sending satoshis to buyer' 14 : 24*60*60, # 'Sucessful trade' diff --git a/frontend/src/components/TradeBox.js b/frontend/src/components/TradeBox.js index b132ebf4..1d7b90ac 100644 --- a/frontend/src/components/TradeBox.js +++ b/frontend/src/components/TradeBox.js @@ -44,6 +44,17 @@ export default class TradeBox extends Component { } } + Sound = ({soundFileName}) => ( + // Four filenames: "locked-invoice", "taker-found", "open-chat", "sucessful" +