Skip to content

Commit 311e7d0

Browse files
committed
chore: fix order hash computation
1 parent 30ead69 commit 311e7d0

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

examples/chain_client/0_LocalOrderHash.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,11 @@
2323

2424
async def main() -> None:
2525
# select network: local, testnet, mainnet
26-
network = Network.mainnet(node="sentry1")
26+
network = Network.testnet()
2727
composer = ProtoMsgComposer(network=network.string())
2828

2929
# initialize grpc client
30-
client = AsyncClient(network, insecure=True)
30+
client = AsyncClient(network, insecure=False)
3131
await client.sync_timeout_height()
3232

3333
# load account
@@ -246,7 +246,7 @@ async def main() -> None:
246246
)
247247

248248
# compute order hashes
249-
order_hashes = order_hash_manager.compute_order_hashes(spot_orders=spot_orders, derivative_orders=derivative_orders, subaccount_id=1)
249+
order_hashes = order_hash_manager.compute_order_hashes(spot_orders=spot_orders, derivative_orders=derivative_orders, subaccount_index=1)
250250

251251
print("computed spot order hashes", order_hashes.spot)
252252
print("computed derivative order hashes", order_hashes.derivative)

0 commit comments

Comments
 (0)