diff --git a/src/packet/clone.js b/src/packet/clone.js index 4db62583..2bd62d1f 100644 --- a/src/packet/clone.js +++ b/src/packet/clone.js @@ -51,6 +51,9 @@ export function clonePackets(options) { if (options.privateKeys) { options.privateKeys = options.privateKeys.map(key => key.toPacketlist()); } + if (options.publicKey) { + options.publicKey = options.publicKey.toPacketlist(); + } if (options.privateKey) { options.privateKey = options.privateKey.toPacketlist(); } @@ -116,6 +119,9 @@ export function parseClonedPackets(options) { if (options.privateKeys) { options.privateKeys = options.privateKeys.map(packetlistCloneToKey); } + if (options.publicKey) { + options.publicKey = packetlistCloneToKey(options.publicKey); + } if (options.privateKey) { options.privateKey = packetlistCloneToKey(options.privateKey); }