Skip to content

Comments

Make change_account method async to support proper await usage#64

Merged
cleitonleonel merged 1 commit intocleitonleonel:masterfrom
hax3xploit:patch-2
Jul 15, 2025
Merged

Make change_account method async to support proper await usage#64
cleitonleonel merged 1 commit intocleitonleonel:masterfrom
hax3xploit:patch-2

Conversation

@hax3xploit
Copy link
Contributor

Refactored the change_account method in the Quotex client to be asynchronous (async def) in order to support proper usage with await across the codebase.

Previously, this method was synchronous, which caused a TypeError ("NoneType can't be used in 'await' expression") when await self.client.change_account(...) was called. Since self.api.change_account(...) involves asynchronous behavior (likely network I/O over websockets), this method should have been async from the beginning.

This change ensures safe, consistent async handling for account switching operations throughout the application.

image

Refactored the `change_account` method in the Quotex client to be asynchronous (`async def`) 
in order to support proper usage with `await` across the codebase.

Previously, this method was synchronous, which caused a TypeError ("NoneType can't be used in 'await' expression")
when `await self.client.change_account(...)` was called. Since `self.api.change_account(...)` 
involves asynchronous behavior (likely network I/O over websockets), this method should have 
been async from the beginning.

This change ensures safe, consistent async handling for account switching operations throughout the application.
@cleitonleonel cleitonleonel merged commit 1e1ced6 into cleitonleonel:master Jul 15, 2025
0 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants