From c6460ea7ce4a55f696c3934b27320b7f3bc2ac02 Mon Sep 17 00:00:00 2001
From: Ludovic Chenut <ludovic@status.im>
Date: Thu, 19 Oct 2023 12:12:56 +0200
Subject: [PATCH] fixes pinned + webrtctransport

---
 .pinned                               | 4 ++--
 libp2p/transports/webrtctransport.nim | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/.pinned b/.pinned
index bb6c61dd7..661f150e5 100644
--- a/.pinned
+++ b/.pinned
@@ -1,5 +1,5 @@
 bearssl;https://github.com/status-im/nim-bearssl@#e4157639db180e52727712a47deaefcbbac6ec86
-binary_serialization;https://github.com/status-im/nim-binary-serialization.git@#f9c05ed21e6be17c0d1e16a364a0ab19fe4a64bf
+binary_serialization;https://github.com/status-im/nim-binary-serialization.git@#38a73a70fd43f3835ca01a877353858b19e39d70
 chronicles;https://github.com/status-im/nim-chronicles@#32ac8679680ea699f7dbc046e8e0131cac97d41a
 chronos;https://github.com/status-im/nim-chronos@#ba143e029f35fd9b4cd3d89d007cc834d0d5ba3c
 dnsclient;https://github.com/ba0f3/dnsclient.nim@#23214235d4784d24aceed99bbfe153379ea557c8
@@ -15,6 +15,6 @@ serialization;https://github.com/status-im/nim-serialization@#4bdbc29e54fe540499
 stew;https://github.com/status-im/nim-stew@#3159137d9a3110edb4024145ce0ba778975de40e
 testutils;https://github.com/status-im/nim-testutils@#dfc4c1b39f9ded9baf6365014de2b4bfb4dafc34
 unittest2;https://github.com/status-im/nim-unittest2@#2300fa9924a76e6c96bc4ea79d043e3a0f27120c
-webrtc;https://github.com/status-im/nim-webrtc.git@#7dfb18eefdbd2e722cdec6d6a7b255015365d308
+webrtc;https://github.com/status-im/nim-webrtc.git@#0504d863407c1d14bf39478ba2335d299caac6ef
 websock;https://github.com/status-im/nim-websock@#f8ed9b40a5ff27ad02a3c237c4905b0924e3f982
 zlib;https://github.com/status-im/nim-zlib@#a2f44bb7f65571a894227ff6fde9298a104e03a5
diff --git a/libp2p/transports/webrtctransport.nim b/libp2p/transports/webrtctransport.nim
index d06a1795c..4e673e871 100644
--- a/libp2p/transports/webrtctransport.nim
+++ b/libp2p/transports/webrtctransport.nim
@@ -345,7 +345,7 @@ method start*(
     self.servers &= server
 
     let
-      cert = server.dtls.localCertificate
+      cert = server.dtlsLocalCertificate()
       certHash = MultiHash.digest("sha2-256", cert).get().data.buffer
       encodedCertHash = MultiBase.encode("base64", certHash).get()
     self.addrs[i] = (MultiAddress.init(server.udp.laddr, IPPROTO_UDP).tryGet() & MultiAddress.init(multiCodec("webrtc-direct")).tryGet() & MultiAddress.init(multiCodec("cert-hash"), encodedCertHash).tryGet()).tryGet()