From 3cfaf6dc61d7a3eab64adf07ae7155023c9863da Mon Sep 17 00:00:00 2001 From: herkulessi Date: Tue, 7 Apr 2026 18:50:25 +0200 Subject: reset transaction timeout counter on transaction start --- taler2.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/taler2.py b/taler2.py index 8bb8a3a..8aacf70 100644 --- a/taler2.py +++ b/taler2.py @@ -135,6 +135,7 @@ class Withdrawal: taler_qrcode: tk.Label withdrawal: Withdrawal | None bank: TalerBank +pollcount: int = 0 def startwin(): global root @@ -169,6 +170,8 @@ def startwin(): main_taler = tk.Frame(master=root) def main_start_button_func(): + global pollcount + pollcount = 0 main_start.place_forget() main_scan.place(relx=0, rely=0, relwidth=1, relheight=1) main_start_button = tk.Button(master=main_start, command=main_start_button_func, text="Click here to start", font=font) @@ -217,9 +220,10 @@ def main(): image.resize((200,200)) image = ImageTk.PhotoImage(image.resize((200,200))) taler_qrcode.configure(image = image, width = 200, height = 200) + global pollcount pollcount = 0 while withdrawal.poll(): - if pollcount > 500: + if pollcount > 30: withdrawal.end() pollcount += 1 main_scan.place_forget() -- cgit v1.2.3