SatSale

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit a0053c7249230249e048ae00e2b4d5fbf78be79a
parent a2cfca4186b8d29f6d3e5d2b5b7858aec71c6bce
Author: NicholasFarrow <nicholas.w.farrow@gmail.com>
Date:   Fri, 25 Dec 2020 02:38:44 +1100

bug fixes with invoice attributes missing

Diffstat:
Minvoice/payment_invoice.py | 3++-
Minvoice/price_feed.py | 2+-
2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/invoice/payment_invoice.py b/invoice/payment_invoice.py @@ -8,7 +8,7 @@ class invoice: def __init__(self, dollar_value, currency, label): self.dollar_value = dollar_value self.currency = currency - self.value = get_btc_value(dollar_value, currency) + self.value = round(get_btc_value(dollar_value, currency), 8) self.label = label self.id = str(uuid.uuid4()) self.status = 'Payment initialised.' @@ -16,3 +16,4 @@ class invoice: self.time_left = config.payment_timeout self.confirmed_paid = 0 self.unconfirmed_paid = 0 + self.paid = False diff --git a/invoice/price_feed.py b/invoice/price_feed.py @@ -38,7 +38,7 @@ def get_btc_value(dollar_value, currency): raise Exception("Dollar value should be a float.") except Exception as e: print(e) - raise + return float_value