Skip to content

Conversation

@karamelniycoder
Copy link
Contributor

@karamelniycoder karamelniycoder commented Aug 3, 2025

ret can be None if any errors occurs, for example with error «TriggerPrice is invalid» on creating order.
cuz ret.code raising 'NoneType' object has no attribute 'code'

created_tx, ret, err = await func(self, *args, **kwargs, nonce=nonce, api_key_index=api_key_index)
if ret.code != CODE_OK:
   ^^^^^^^^

now we checking value of ret as in any other code

created_tx, ret, err = await func(self, *args, **kwargs, nonce=nonce, api_key_index=api_key_index)
if (ret is None and err) or (ret and ret.code != CODE_OK):

@gioto64 gioto64 merged commit dd2d3c2 into elliottech:main Oct 23, 2025
4 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