-
Notifications
You must be signed in to change notification settings - Fork 465
0x-sra-client.py: Fix bug in config_order, and other small improvements #2399
Conversation
Root problem is that there are too many backslashes in the SRA spec itself. See #1727 This was previously fixed for heavily-tested endpoints (get and post order, etc), but was only recently discovered for the get-order-config endpoint.
ee8fc3f
to
a4bd546
Compare
|
print("Removing src/zero_ex/contract_wrappers/*/__init__.py...") | ||
for contract in glob( | ||
path.join( | ||
".", "src", "zero_ex", "contract_wrappers", "*", "__init__.py" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
small nit here - this path is relative to the directory the current process is in, and not relative to the directory the current file is in. I think you want the latter?
Example
If I ran..
cd /tmp/
python path/to/monorepo/python-packages/contract_wrappers/setup.py
LOC 114 would result in /tmp/src/zero_ex/contract_wrappers/*/__init__.py
while I think you wanted it to be /tmp/path/to/monorepo/python-packages/contract_wrappers/src/zero_ex/contract_wrappers/*/__init__.py
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're absolutely right on this... but I don't think it's worth accommodating at this point. The script already generally lacks support for this type of interaction.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yup yup I agree
@feuGeneA the more I try out this code, the more I feel that Is there any way that the current |
Aside from this, you code works great. I tested it using: >>> relayer = RelayerApi('https://v3.kovan.backend.sra.0x.org')
>>> order_config = relayer.get_order_config(relayer_api_order_config_payload_schema=my_order)
>>> print(order_config)
{'fee_recipient_address': '0x0000000000000000000000000000000000000000',
'maker_fee': '0',
'sender_address': '0x0000000000000000000000000000000000000000',
'taker_fee': '0'} |
Description
Fixes #2385
See generated docs at https://104044-92181371-gh.circle-artifacts.com/0/root/repo/python-packages/sra_client/build/docs/html/index.html
Type of changes: