def change_balance(self, user: User, value: float): with self.c: user.balance = user.balance + float(value) self.update_user(user=user)
def top_up_user_balance(self, user: User, amount: (int or float)): user.balance = float(user.balance) + float(amount) self.update_user_in_db(user)