Skip to content

Commit c3a82d2

Browse files
committed
Merge branch 'main' of https://github.com/hyperledger/aries-cloudagent-python into issue#1791
2 parents b15a2ef + 722dc41 commit c3a82d2

2 files changed

Lines changed: 1 addition & 34 deletions

File tree

aries_cloudagent/ledger/indy_vdr.py

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@
1919
from ..cache.base import BaseCache
2020
from ..core.profile import Profile
2121
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
2422
from ..storage.base import BaseStorage, StorageRecord
2523
from ..utils import sentinel
2624
from ..utils.env import storage_path
@@ -464,19 +462,6 @@ async def create_and_send_schema(
464462
else:
465463
raise
466464

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-
480465
return schema_id, schema_def
481466

482467
async def check_existing_schema(
@@ -715,24 +700,6 @@ async def create_and_send_credential_definition(
715700
if not write_ledger:
716701
return (credential_definition_id, {"signed_txn": resp}, novel)
717702

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-
736703
return (credential_definition_id, json.loads(credential_definition_json), novel)
737704

738705
async def get_credential_definition(self, credential_definition_id: str) -> dict:

aries_cloudagent/storage/tests/test_indy_storage.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@ async def test_storage_del_close(self):
354354
while not mock_indy_close_search.await_count and c < 10:
355355
await asyncio.sleep(0.1)
356356
c += 1
357-
mock_indy_close_search.assert_awaited_once_with(1)
357+
mock_indy_close_search.assert_awaited_with(1)
358358

359359
with async_mock.patch.object( # error on close
360360
indy.non_secrets, "open_wallet_search", async_mock.CoroutineMock()

0 commit comments

Comments
 (0)