diff options
| author | herkulessi <git@herkulessi.de> | 2026-04-07 18:50:25 +0200 |
|---|---|---|
| committer | herkulessi <git@herkulessi.de> | 2026-04-07 19:03:00 +0200 |
| commit | 3cfaf6dc61d7a3eab64adf07ae7155023c9863da (patch) | |
| tree | f2dd6aeaac235bcf49bb5723c7e1e946fdac2df0 | |
| parent | 50a6d09f946c546d39f3b6c38ea4c65fd1d11034 (diff) | |
reset transaction timeout counter on transaction start
| -rw-r--r-- | taler2.py | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -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() |
