Attempt to fix PREDICTION showing with count -1 in final report
This commit is contained in:
@@ -293,9 +293,8 @@ class WebSocketsPool:
|
||||
"REFUND",
|
||||
-points_placed,
|
||||
counter=-1,
|
||||
create_if_missing=False,
|
||||
)
|
||||
else:
|
||||
elif result_type == "WIN":
|
||||
logger.info(
|
||||
"REMOVE PREDICTION FROM POINTS MSG"
|
||||
) # TODO remove
|
||||
@@ -303,7 +302,6 @@ class WebSocketsPool:
|
||||
"PREDICTION",
|
||||
-points_won,
|
||||
counter=-1,
|
||||
create_if_missing=False,
|
||||
)
|
||||
elif message.type == "prediction-made":
|
||||
event_prediction.bet_confirmed = True
|
||||
|
||||
@@ -91,10 +91,8 @@ class Streamer(object):
|
||||
]
|
||||
)
|
||||
|
||||
def update_history(self, reason_code, earned, counter=1, create_if_missing=True):
|
||||
def update_history(self, reason_code, earned, counter=1):
|
||||
if reason_code not in self.history:
|
||||
if not create_if_missing:
|
||||
return
|
||||
self.history[reason_code] = {"counter": 0, "amount": 0}
|
||||
self.history[reason_code]["counter"] += counter
|
||||
self.history[reason_code]["amount"] += earned
|
||||
|
||||
Reference in New Issue
Block a user