Spaces:
Sleeping
Sleeping
Update components/agentcreation.py
Browse files
components/agentcreation.py
CHANGED
|
@@ -62,10 +62,10 @@ async def transfer_sol(from_keypair, to_pubkey, amount_sol):
|
|
| 62 |
|
| 63 |
def load_keypair(agent):
|
| 64 |
|
| 65 |
-
|
| 66 |
keypair=None
|
| 67 |
|
| 68 |
-
for doc in
|
| 69 |
if doc["agent_id"]==agent:
|
| 70 |
keypair=doc["secret_key"]
|
| 71 |
|
|
|
|
| 62 |
|
| 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 |
|