File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -306,6 +306,7 @@ async def ecdh_1pu_encrypt(
306306 builder .set_protected (
307307 OrderedDict (
308308 [
309+ ("typ" , "application/didcomm+encrypted" ),
309310 ("alg" , alg_id ),
310311 ("enc" , enc_id ),
311312 ("apu" , b64url (apu )),
Original file line number Diff line number Diff line change @@ -105,7 +105,8 @@ async def prepare_forward(
105105
106106 # Grab our target to pack the initial message to, then pack the message
107107 # for the DID target
108- next_target = chain .pop (0 )["did" ]
108+ final_destination = chain .pop (0 )
109+ next_target = final_destination ["did" ]
109110 packed_message = encoded_message
110111
111112 # Loop through the entire services chain and pack the message for each
@@ -130,4 +131,7 @@ async def prepare_forward(
130131
131132 # Return the forward-packed message as well as the last service in the
132133 # chain, which is the destination of the top-level forward message.
133- return (packed_message , chain [- 1 ]["service" ])
134+ service = final_destination ["service" ]
135+ if len (chain ):
136+ service = chain [- 1 ]["service" ]
137+ return (packed_message , service )
Original file line number Diff line number Diff line change @@ -47,6 +47,8 @@ ignore = [
4747
4848line-length = 90
4949
50+ extend-exclude = [" example*.py" ]
51+
5052[tool .ruff .per-file-ignores ]
5153"**/{tests}/*" = [" F841" , " D" , " E501" ]
5254
You can’t perform that action at this time.
0 commit comments