Spaces:
Sleeping
Sleeping
Update components/agentcreation.py
Browse files
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
|
| 69 |
-
if doc
|
| 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)
|