|
19 | 19 | from ..cache.base import BaseCache |
20 | 20 | from ..core.profile import Profile |
21 | 21 | from ..indy.issuer import IndyIssuer, IndyIssuerError, DEFAULT_CRED_DEF_TAG |
22 | | -from ..messaging.credential_definitions.util import CRED_DEF_SENT_RECORD_TYPE |
23 | | -from ..messaging.schemas.util import SCHEMA_SENT_RECORD_TYPE |
24 | 22 | from ..storage.base import BaseStorage, StorageRecord |
25 | 23 | from ..utils import sentinel |
26 | 24 | from ..utils.env import storage_path |
@@ -464,19 +462,6 @@ async def create_and_send_schema( |
464 | 462 | else: |
465 | 463 | raise |
466 | 464 |
|
467 | | - schema_id_parts = schema_id.split(":") |
468 | | - schema_tags = { |
469 | | - "schema_id": schema_id, |
470 | | - "schema_issuer_did": public_info.did, |
471 | | - "schema_name": schema_id_parts[-2], |
472 | | - "schema_version": schema_id_parts[-1], |
473 | | - "epoch": str(int(time())), |
474 | | - } |
475 | | - record = StorageRecord(SCHEMA_SENT_RECORD_TYPE, schema_id, schema_tags) |
476 | | - async with self.profile.session() as session: |
477 | | - storage = session.inject(BaseStorage) |
478 | | - await storage.add_record(record) |
479 | | - |
480 | 465 | return schema_id, schema_def |
481 | 466 |
|
482 | 467 | async def check_existing_schema( |
@@ -715,24 +700,6 @@ async def create_and_send_credential_definition( |
715 | 700 | if not write_ledger: |
716 | 701 | return (credential_definition_id, {"signed_txn": resp}, novel) |
717 | 702 |
|
718 | | - # Add non-secrets record |
719 | | - schema_id_parts = schema_id.split(":") |
720 | | - cred_def_tags = { |
721 | | - "schema_id": schema_id, |
722 | | - "schema_issuer_did": schema_id_parts[0], |
723 | | - "schema_name": schema_id_parts[-2], |
724 | | - "schema_version": schema_id_parts[-1], |
725 | | - "issuer_did": public_info.did, |
726 | | - "cred_def_id": credential_definition_id, |
727 | | - "epoch": str(int(time())), |
728 | | - } |
729 | | - record = StorageRecord( |
730 | | - CRED_DEF_SENT_RECORD_TYPE, credential_definition_id, cred_def_tags |
731 | | - ) |
732 | | - async with self.profile.session() as session: |
733 | | - storage = session.inject(BaseStorage) |
734 | | - await storage.add_record(record) |
735 | | - |
736 | 703 | return (credential_definition_id, json.loads(credential_definition_json), novel) |
737 | 704 |
|
738 | 705 | async def get_credential_definition(self, credential_definition_id: str) -> dict: |
|
0 commit comments