refactor: keep provider presentation self-contained in spec

This commit is contained in:
3252a8
2026-05-18 15:35:55 +03:00
parent c9c12b9ed6
commit 07b35036e7
14 changed files with 5 additions and 47 deletions
@@ -462,7 +462,7 @@ def get_payment_method_keyboard(
for method in settings.payment_methods_order:
spec = get_provider_spec(method)
if not spec or not spec.button_text_key or not spec.is_enabled(settings):
if not spec or not spec.callback_prefix or not spec.is_enabled(settings):
continue
callback_data = spec.callback_data(
value=value_str,
@@ -473,7 +473,7 @@ def get_payment_method_keyboard(
if not callback_data:
continue
builder.button(
text=provider_telegram_button_text(spec, settings, _, language=lang),
text=provider_telegram_button_text(spec, settings, language=lang),
callback_data=callback_data,
)
builder.button(