Skip to content

Commit

Permalink
chore: consolidate cred_def metadata / cleanup
Browse files Browse the repository at this point in the history
Signed-off-by: Colton Wolkins (Indicio work address) <[email protected]>
  • Loading branch information
TheTechmage committed Mar 8, 2022
1 parent d4a20d6 commit fb5aff4
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions aries_cloudagent/messaging/credential_definitions/routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -248,10 +248,12 @@ async def credential_definitions_send_credential_definition(request: web.BaseReq
except (IndyIssuerError, LedgerError) as e:
raise web.HTTPBadRequest(reason=e.message) from e

issuer_did = cred_def_id.split(":")[0]
meta_data = {
"context": {
"schema_id": schema_id,
"cred_def_id": cred_def_id,
"issuer_did": issuer_did,
"support_revocation": support_revocation,
"novel": novel,
"tag": tag,
Expand All @@ -264,10 +266,6 @@ async def credential_definitions_send_credential_definition(request: web.BaseReq

if not create_transaction_for_endorser:
# Notify event
issuer_did = cred_def_id.split(":")[0]
meta_data["context"]["schema_id"] = schema_id
meta_data["context"]["cred_def_id"] = cred_def_id
meta_data["context"]["issuer_did"] = issuer_did
meta_data["processing"]["auto_create_rev_reg"] = True
await notify_cred_def_event(context.profile, cred_def_id, meta_data)

Expand Down

0 comments on commit fb5aff4

Please sign in to comment.