From 312a384d03c0f81c73a42380f2002c67493632cc Mon Sep 17 00:00:00 2001 From: Wong Yiek Heng Date: Mon, 6 Oct 2025 08:01:39 +0800 Subject: [PATCH] - Trial for rounding credit to 2 decimal --- cm_bot_hal.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cm_bot_hal.py b/cm_bot_hal.py index 7bee02b..fefb89f 100644 --- a/cm_bot_hal.py +++ b/cm_bot_hal.py @@ -184,7 +184,7 @@ class CM_BOT_HAL: password = f_password ) == False: return(f'[Fail login] {f_username} cannot login.') - amount = cm_bot.get_user_credit() - 0.01 + amount = round(cm_bot.get_user_credit() - 0.01, 2) if amount <= 0.01: return(f'[No enough credit] {f_username} do not have enough credit.') if cm_bot.transfer_credit(t_username, t_password, amount) == True: