fix: txtimer  does nothing when no webhook provided
@@ -36,12 +36,14 @@ class TxTimer:
self.timer_tick = timer_tick
self.waiting = False
self.sender = None
- self.webhook = os.environ["TX_TIMER_WEBHOOK"]
+ self.webhook = os.environ.get("TX_TIMER_WEBHOOK")
self.tx_type = ""
def alert(self, msg: str) -> None:
- print(msg)
+ if self.webhook:
requests.post(self.webhook, {"content": msg})
+ else:
+ print("No webhook supplied")
def track_tx(self) -> None:
"""
