Junaidb commited on
Commit
fc846df
·
verified ·
1 Parent(s): 8199adb

Update components/agentcreation.py

Browse files
Files changed (1) hide show
  1. components/agentcreation.py +4 -3
components/agentcreation.py CHANGED
@@ -63,10 +63,11 @@ async def transfer_sol(from_keypair, to_pubkey, amount_sol):
63
  def load_keypair(agent):
64
 
65
  document=coll.find_one({"owner":"system"})
 
66
  keypair=None
67
-
68
- for doc in document["agents"]:
69
- if doc["agent_id"]==agent:
70
  keypair=doc["secret_key"]
71
 
72
  secret_key_bytes =bytes.fromhex(keypair)
 
63
  def load_keypair(agent):
64
 
65
  document=coll.find_one({"owner":"system"})
66
+ agents=document["agents"]
67
  keypair=None
68
+ print(agents)
69
+ for agents:
70
+ if doc.get("agent_id")==agent:
71
  keypair=doc["secret_key"]
72
 
73
  secret_key_bytes =bytes.fromhex(keypair)