Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix issue with startup sequence for faber agent #1415

Merged
merged 2 commits into from
Sep 15, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions demo/runners/agent_container.py
Original file line number Diff line number Diff line change
Expand Up @@ -627,13 +627,6 @@ async def initialize(
log_msg("Admin URL is at:", self.agent.admin_url)
log_msg("Endpoint URL is at:", self.agent.endpoint)

if self.public_did and self.cred_type == CRED_FORMAT_JSON_LD:
# create did of appropriate type
data = {"method": DID_METHOD_KEY, "options": {"key_type": KEY_TYPE_BLS}}
new_did = await self.agent.admin_POST("/wallet/did/create", data=data)
self.agent.did = new_did["result"]["did"]
log_msg("Created DID key")

if self.mediation:
self.mediator_agent = await start_mediator_agent(
self.start_port + 4, self.genesis_txns
Expand All @@ -657,6 +650,13 @@ async def initialize(
if not await connect_wallet_to_mediator(self.agent, self.mediator_agent):
raise Exception("Mediation setup FAILED :-(")

if self.public_did and self.cred_type == CRED_FORMAT_JSON_LD:
# create did of appropriate type
data = {"method": DID_METHOD_KEY, "options": {"key_type": KEY_TYPE_BLS}}
new_did = await self.agent.admin_POST("/wallet/did/create", data=data)
self.agent.did = new_did["result"]["did"]
log_msg("Created DID key")

if schema_name and schema_attrs:
# Create a schema/cred def
self.cred_def_id = await self.create_schema_and_cred_def(
Expand Down