diff --git a/libp2p/multiaddress.nim b/libp2p/multiaddress.nim index 562945456..6f824b395 100644 --- a/libp2p/multiaddress.nim +++ b/libp2p/multiaddress.nim @@ -665,7 +665,7 @@ proc init*(mtype: typedesc[MultiAddress], protocol: MultiCodec, value: PeerID): MultiAddress {.inline.} = ## Initialize MultiAddress object from protocol id ``protocol`` and peer id ## ``value``. - init(mtype, protocol, cast[seq[byte]](value)) + init(mtype, protocol, value.data) proc init*(mtype: typedesc[MultiAddress], protocol: MultiCodec): MultiAddress = ## Initialize MultiAddress object from protocol id ``protocol``.