Merge pull request #10644 from iridescentGray/develop

chore: remove redundant method
This commit is contained in:
Matthias 2024-09-11 06:40:53 +02:00 committed by GitHub
commit 5605bdc7a3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1274,7 +1274,7 @@ class Telegram(RPCHandler):
InlineKeyboardButton(text=trade[1], callback_data=f"force_exit__{trade[0]}")
for trade in trades
]
buttons_aligned = self._layout_inline_keyboard_onecol(trade_buttons)
buttons_aligned = self._layout_inline_keyboard(trade_buttons, cols=1)
buttons_aligned.append(
[InlineKeyboardButton(text="Cancel", callback_data="force_exit__cancel")]
@ -1348,12 +1348,6 @@ class Telegram(RPCHandler):
) -> List[List[InlineKeyboardButton]]:
return [buttons[i : i + cols] for i in range(0, len(buttons), cols)]
@staticmethod
def _layout_inline_keyboard_onecol(
buttons: List[InlineKeyboardButton], cols=1
) -> List[List[InlineKeyboardButton]]:
return [buttons[i : i + cols] for i in range(0, len(buttons), cols)]
@authorized_only
async def _force_enter(
self, update: Update, context: CallbackContext, order_side: SignalDirection