From 555c2a2e8b19e324a38afdbde5ec3f87d8602728 Mon Sep 17 00:00:00 2001 From: samtin0x <40127309+samtin0x@users.noreply.github.com> Date: Thu, 17 Oct 2024 10:06:14 +0100 Subject: [PATCH] feat: set pyv1 client metadata --- v4-client-py-deprecated/v4_client_py/clients/modules/post.py | 5 ++++- v4-client-py-v2/dydx_v4_client/node/message.py | 1 + v4-client-py-v2/pyproject.toml | 2 +- v4-client-py-v2/tests/test_mutating_node_client.py | 1 - v4-client-py-v2/tests/test_v4_proto.py | 2 +- 5 files changed, 7 insertions(+), 4 deletions(-) diff --git a/v4-client-py-deprecated/v4_client_py/clients/modules/post.py b/v4-client-py-deprecated/v4_client_py/clients/modules/post.py index ec8395b4..4bfa61c0 100644 --- a/v4-client-py-deprecated/v4_client_py/clients/modules/post.py +++ b/v4-client-py-deprecated/v4_client_py/clients/modules/post.py @@ -15,6 +15,9 @@ from ...chain.aerial.client.utils import prepare_and_broadcast_basic_transaction +PY_V1_CLIENT_ID = 1 + + class Post: def __init__( self, @@ -134,7 +137,7 @@ def place_order( subticks=subticks, time_in_force=time_in_force, reduce_only=reduce_only, - client_metadata=client_metadata, + client_metadata=PY_V1_CLIENT_ID, condition_type=condition_type, conditional_order_trigger_subticks=conditional_order_trigger_subticks, ) diff --git a/v4-client-py-v2/dydx_v4_client/node/message.py b/v4-client-py-v2/dydx_v4_client/node/message.py index 2ccf1289..89771bae 100644 --- a/v4-client-py-v2/dydx_v4_client/node/message.py +++ b/v4-client-py-v2/dydx_v4_client/node/message.py @@ -15,6 +15,7 @@ PY_V2_CLIENT_ID = 2 + def order( order_id: OrderId, side: Order.Side, diff --git a/v4-client-py-v2/pyproject.toml b/v4-client-py-v2/pyproject.toml index 6bb94bfc..b1e50aef 100644 --- a/v4-client-py-v2/pyproject.toml +++ b/v4-client-py-v2/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "dydx-v4-client" -version = "1.1.0" +version = "1.1.1" description = "" authors = [ "Saul Martin ", diff --git a/v4-client-py-v2/tests/test_mutating_node_client.py b/v4-client-py-v2/tests/test_mutating_node_client.py index c2aa435f..7c4ace5c 100644 --- a/v4-client-py-v2/tests/test_mutating_node_client.py +++ b/v4-client-py-v2/tests/test_mutating_node_client.py @@ -80,7 +80,6 @@ async def test_order( placed = await node_client.place_order( wallet, test_order, - ) assert_successful_broadcast(placed) diff --git a/v4-client-py-v2/tests/test_v4_proto.py b/v4-client-py-v2/tests/test_v4_proto.py index 362378a0..4113bbaa 100644 --- a/v4-client-py-v2/tests/test_v4_proto.py +++ b/v4-client-py-v2/tests/test_v4_proto.py @@ -13,7 +13,7 @@ ) from tests.conftest import TEST_ADDRESS -SERIALIZED_PLACE_ORDER = b"\nF\n1\n-\n+dydx14zzueazeh0hj67cghhf9jypslcf9sh2n5k6art\x18@\x10\x01\x18\x80\xad\xe2\x04 \x80\xa0\xbe\x81\x95\x015\t\x9cYf" +SERIALIZED_PLACE_ORDER = b"\nH\n1\n-\n+dydx14zzueazeh0hj67cghhf9jypslcf9sh2n5k6art\x18@\x10\x01\x18\x80\xad\xe2\x04 \x80\xa0\xbe\x81\x95\x015\t\x9cYfH\x02" SERIALIZED_CANCEL_ORDER = ( b"\n1\n-\n+dydx14zzueazeh0hj67cghhf9jypslcf9sh2n5k6art\x18@\x1d\t\x9cYf" )