Skip to content

Commit 1878e76

Browse files
Made Handover nullable
Signed-off-by: Thomas Röhlich <t.roehlich@esatus.com>
1 parent 405792b commit 1878e76

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/WalletFramework.MdocLib/Security/SessionTranscript.cs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ namespace WalletFramework.MdocLib.Security;
1111
public record SessionTranscript(
1212
Option<DeviceEngagement> DeviceEngagement,
1313
Option<PublicKey> ReaderKey,
14-
IHandover Handover);
14+
Option<IHandover> Handover);
1515

1616
public static class SessionTranscriptFun
1717
{
@@ -45,9 +45,12 @@ public static CBORObject ToCbor(this SessionTranscript sessionTranscript)
4545
result.Add(CBORObject.Null);
4646
}
4747
);
48-
49-
result.Add(sessionTranscript.Handover.ToCbor());
5048

49+
sessionTranscript.Handover.Match(
50+
handover => { result.Add(handover.ToCbor()); },
51+
() => { result.Add(CBORObject.Null); }
52+
);
53+
5154
return result;
5255
}
5356
}

0 commit comments

Comments
 (0)