Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: get wallet did only when not using USE_OOB_PRESENT_PROOF #576

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions oidc-controller/api/routers/oidc.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,13 +112,7 @@ async def get_authorize(request: Request, db: Database = Depends(get_db)):
pres_exch_dict = response.dict()

# Prepeare the presentation request
client = AcapyClient()
use_public_did = not settings.USE_OOB_LOCAL_DID_SERVICE
wallet_did = client.get_wallet_did(public=use_public_did)

byo_attachment = PresentProofv10Attachment.build(
pres_exch_dict["presentation_request"]
)

msg = None
if settings.USE_OOB_PRESENT_PROOF:
Expand All @@ -127,6 +121,11 @@ async def get_authorize(request: Request, db: Database = Depends(get_db)):
)
msg_contents = oob_invite_response.invitation
else:
wallet_did = client.get_wallet_did(public=use_public_did)

byo_attachment = PresentProofv10Attachment.build(
pres_exch_dict["presentation_request"]
)
s_d = ServiceDecorator(
service_endpoint=client.service_endpoint, recipient_keys=[wallet_did.verkey]
)
Expand Down