Skip to content

Commit dfa299b

Browse files
authored
Fix comments in basic agent example (#128)
1 parent 866d18d commit dfa299b

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

examples/basic_agent.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ def main():
2121
# Set up the environment (exchange, account info, etc.) for testing purposes.
2222
address, info, exchange = example_utils.setup(constants.TESTNET_API_URL, skip_ws=True)
2323

24-
# Ensure that the wallet address and agent address are not the same
25-
# This prevents the risk of accidentally creating an agent using the wallet itself.
26-
if exchange.account_address != exchange.wallet.address:
24+
# Ensure that the wallet address and account address are the same.
25+
# If these are not the same then an agent will be approved for the wallet address instead of the account address, and the order will fail.
26+
if address != exchange.wallet.address:
2727
raise Exception("You should not create an agent using an agent")
2828

2929
approve_result, agent_key = exchange.approve_agent()
@@ -73,8 +73,8 @@ def main():
7373
print("Running with extra agent address:", extra_agent_account.address)
7474

7575
# Place an order with the extra agent using the same process as the original agent.
76-
print("Placing order with original agent")
77-
order_result = agent_exchange.order("ETH", True, 0.2, 1000, {"limit": {"tif": "Gtc"}})
76+
print("Placing order with extra agent")
77+
order_result = extra_agent_exchange.order("ETH", True, 0.2, 1000, {"limit": {"tif": "Gtc"}})
7878
print(order_result)
7979

8080
# If the extra agent's order is placed successfully, attempt to cancel it.

0 commit comments

Comments
 (0)