Skip to content

Commit

Permalink
Updates from comments
Browse files Browse the repository at this point in the history
Signed-off-by: jamshale <jamiehalebc@gmail.com>
  • Loading branch information
jamshale committed Jan 13, 2025
1 parent c32ba3e commit 51bf16b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
9 changes: 3 additions & 6 deletions webvh/webvh/did/handlers/handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
from ..endorsement_manager import EndorsementManager
from ..messages.endorsement import EndorsementRequest, EndorsementResponse
from ..operations_manager import DidWebvhOperationsManager
from ..utils import get_url_decoded_domain

LOGGER = logging.getLogger(__name__)

Expand All @@ -29,11 +30,7 @@ async def _handle_auto_endorse(
):
"""Handle automatic endorsement."""
domain = proof.get("domain")
# Replace %3A with : if domain is URL encoded
if "%3A" in domain:
url_decoded_domain = domain.replace("%3A", ":")
else:
url_decoded_domain = domain
url_decoded_domain = get_url_decoded_domain(domain)

async with context.profile.session() as session:
# Attempt to get the endorsement key for the domain
Expand Down Expand Up @@ -101,7 +98,7 @@ async def handle(self, context: RequestContext, responder: BaseResponder):
"endorse the log entry."
)
# Save the log entry to the wallet for manual endorsement
await EndorsementManager(context.profile).save_document(
await EndorsementManager(context.profile).save_log_entry(
document, connection_id=context.connection_record.connection_id
)
await responder.send(
Expand Down
2 changes: 1 addition & 1 deletion webvh/webvh/routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ class IdRequestParamSchema(OpenAPISchema):
required=True,
metadata={
"description": "ID of the DID to endorse",
"example": "did:webvh:prod:1",
"example": "did:web:server.localhost%3A8000:prod:1",
},
)

Expand Down

0 comments on commit 51bf16b

Please sign in to comment.