Skip to content

Commit 9d365e5

Browse files
author
Yuki I
committed
fix: pre removal of non public did logic for ledger operation
1 parent 8a83571 commit 9d365e5

File tree

1 file changed

+15
-4
lines changed

1 file changed

+15
-4
lines changed

acapy_agent/ledger/indy_vdr.py

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1230,11 +1230,22 @@ async def send_revoc_reg_entry(
12301230
"""Publish a revocation registry entry to the ledger."""
12311231
async with self.profile.session() as session:
12321232
wallet = session.inject(BaseWallet)
1233-
if issuer_did:
1234-
did_info = await wallet.get_local_did(issuer_did)
1233+
did_info = None
1234+
1235+
try:
1236+
if issuer_did:
1237+
did_info = await wallet.get_local_did(issuer_did)
1238+
except WalletNotFoundError:
1239+
LOGGER.exception("No issuer DID found for revocation registry entry")
1240+
1241+
if not did_info:
1242+
try:
1243+
did_info = await wallet.get_public_did()
1244+
except WalletNotFoundError:
1245+
LOGGER.exception("No public DID found for revocation registry entry")
12351246
else:
1236-
did_info = await wallet.get_public_did()
1237-
del wallet
1247+
del wallet
1248+
12381249
if not did_info:
12391250
raise LedgerTransactionError(
12401251
"No issuer DID found for revocation registry entry"

0 commit comments

Comments
 (0)