1
Fork 0
mirror of https://github.com/Steffo99/greed.git synced 2024-11-22 05:54:18 +00:00

Fix payment presets list being split as if it was a string

This commit is contained in:
Steffo 2020-09-12 16:07:47 +02:00
parent ee32a82fab
commit 128c146210

View file

@ -784,7 +784,7 @@ class Worker(threading.Thread):
"""Add money to the wallet through a credit card payment.""" """Add money to the wallet through a credit card payment."""
log.debug("Displaying __add_credit_cc") log.debug("Displaying __add_credit_cc")
# Create a keyboard to be sent later # Create a keyboard to be sent later
presets = list(map(lambda s: s.strip(" "), self.cfg["Payments"]["CreditCard"]["payment_presets"].split('|'))) presets = self.cfg["Payments"]["CreditCard"]["payment_presets"]
keyboard = [[telegram.KeyboardButton(str(self.Price(preset)))] for preset in presets] keyboard = [[telegram.KeyboardButton(str(self.Price(preset)))] for preset in presets]
keyboard.append([telegram.KeyboardButton(self.loc.get("menu_cancel"))]) keyboard.append([telegram.KeyboardButton(self.loc.get("menu_cancel"))])
# Boolean variable to check if the user has cancelled the action # Boolean variable to check if the user has cancelled the action