Procházet zdrojové kódy

Don't send message when the dop is tiny in comparison with shares available

Foppe Hemminga před 6 roky
rodič
revize
161e657b74
1 změnil soubory, kde provedl 2 přidání a 1 odebrání
  1. 2 1
      main.py

+ 2 - 1
main.py

@@ -30,10 +30,11 @@ def process_drop(this_stock):
     stock_name = this_stock[0]
     npc_drop = False
     total_stocks = data_latest.total_shares
+    previous_available_shares = data_previous.available_shares
     if model.is_npc_drop(data_previous, data_latest):
         npc_drop = True
     message = view.create_message(
-        stock_name, timestamp_latest, current_price, quantity, current_quantity=total_stocks, npc_drop=npc_drop)
+        stock_name, timestamp_latest, current_price, quantity, current_quantity=previous_available_shares, npc_drop=npc_drop)
     print(message)
     if is_drop:
         view.broadcast(message)