Skip to content

Commit 7470353

Browse files
Updated data agreement QR code to include full connection invitation details.
Earlier the data agreement QR code only included essential connection invitation details. This was a deliberate decision to reduce the size of QR code. This would mean that DataWallet app can no longer show a "CONNECT" popup on scanning the QR code, since remote agent label, image url e.t.c is missing. Since end user convenience is the highest priority, this decision is now abandoned. Updated QR payload includes the entire connection invitation structure including "label", "image_url" e.t.c. Signed-off-by: George J Padayatti <[email protected]>
1 parent 0d7213a commit 7470353

File tree

1 file changed

+3
-10
lines changed

1 file changed

+3
-10
lines changed

mydata_did/v1_0/manager.py

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3086,9 +3086,8 @@ async def construct_data_agreement_qr_code_payload(self,
30863086

30873087
# Create a connection invitation
30883088

3089-
connection_mgr = ConnectionManager(self.context)
30903089
try:
3091-
(connection, invitation) = await connection_mgr.create_invitation(
3090+
(connection, invitation) = await self.create_invitation(
30923091
auto_accept=True, public=False, multi_use=True, alias="DA_" + data_agreement_id + "_QR_" + qr_code_identifier
30933092
)
30943093

@@ -3115,10 +3114,7 @@ async def construct_data_agreement_qr_code_payload(self,
31153114

31163115
result = {
31173116
"qr_id": qr_code_identifier,
3118-
"invitation": {
3119-
"service_endpoint": invitation.endpoint,
3120-
"recipient_keys": invitation.recipient_keys,
3121-
}
3117+
"invitation": invitation.serialize()
31223118
}
31233119

31243120
return result
@@ -3222,10 +3218,7 @@ async def base64_encode_data_agreement_qr_code_payload(self, *, data_agreement_i
32223218

32233219
qr_payload = {
32243220
"qr_id": qr_id,
3225-
"invitation": {
3226-
"service_endpoint": connection_invitation.endpoint,
3227-
"recipient_keys": connection_invitation.recipient_keys,
3228-
}
3221+
"invitation": connection_invitation.serialize(),
32293222
}
32303223

32313224
# Encode payload to base64

0 commit comments

Comments
 (0)