|
@@ -892,9 +892,9 @@ This action cannot be undone.
|
|
|
async def _execute_leverage_callback(self, query, callback_data):
|
|
|
"""Execute leverage command from callback."""
|
|
|
parts = callback_data.split('_')
|
|
|
- if parts[1] == "yes":
|
|
|
- token = parts[2]
|
|
|
- leverage = int(parts[3])
|
|
|
+ if len(parts) > 2 and parts[2] == "yes":
|
|
|
+ token = parts[3]
|
|
|
+ leverage = int(parts[4])
|
|
|
symbol = f"{token}/USDC:USDC"
|
|
|
|
|
|
await query.edit_message_text(text=f"Setting leverage for {token} to {leverage}x...")
|