Skip to content

Commit

Permalink
Merge branch 'main' into feat/public-did-endpts-with-routing-keys
Browse files Browse the repository at this point in the history
  • Loading branch information
dbluhm authored Aug 23, 2022
2 parents d77b7e3 + 2a0e088 commit e1e8d77
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions aries_cloudagent/wallet/routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,15 @@ class DIDCreateSchema(OpenAPISchema):
description="To define a key type for a did:key",
)

seed = fields.Str(
required=False,
description=(
"Optional seed to use for DID, Must be"
"enabled in configuration before use."
),
example="000000000000000000000000Trustee1",
)


class CreateAttribTxnForEndorserOptionSchema(OpenAPISchema):
"""Class for user to input whether to create a transaction for endorser or not."""
Expand Down Expand Up @@ -356,9 +365,9 @@ async def wallet_create_did(request: web.BaseRequest):
f" support key type {key_type.key_type}"
)
)
seed = None
if context.settings.get("wallet.allow_insecure_seed"):
seed = body.get("seed") or None
seed = body.get("seed") or None
if seed and not context.settings.get("wallet.allow_insecure_seed"):
raise web.HTTPBadRequest(reason="Seed support is not enabled")
info = None
async with context.session() as session:
wallet = session.inject_or(BaseWallet)
Expand Down

0 comments on commit e1e8d77

Please sign in to comment.