Fix live premium bug in book

This commit is contained in:
Reckless_Satoshi 2022-01-10 11:11:45 -08:00
parent e493f22842
commit db36277456
No known key found for this signature in database
GPG Key ID: 9C4585B561315571

View File

@ -85,9 +85,9 @@ class Logics():
exchange_rate = get_exchange_rate(Order.currency_dict[str(order.currency)]) exchange_rate = get_exchange_rate(Order.currency_dict[str(order.currency)])
order_rate = float(order.amount) / (float(order.satoshis) / 100000000) order_rate = float(order.amount) / (float(order.satoshis) / 100000000)
premium = order_rate / exchange_rate - 1 premium = order_rate / exchange_rate - 1
premium = int(premium*100) # 2 decimals left
price = order_rate price = order_rate
premium = int(premium*100) # 2 decimals left
return price, premium return price, premium
def order_expires(order): def order_expires(order):