fix: use compress key

`marshal` return the compress key, `bytes` returned the protobuf
serialized key.
This commit is contained in:
Franck Royer 2022-06-23 16:06:37 +10:00
parent fd030e0fbb
commit 5d5e035edb
No known key found for this signature in database
GPG Key ID: A82ED75A8DFC50A4
1 changed files with 5 additions and 1 deletions

View File

@ -82,5 +82,9 @@ export async function createKeypairFromPeerId(
? await unmarshalPrivateKey(peerId.privateKey)
: undefined;
return createKeypair(keypairType, privateKey?.bytes, publicKey?.bytes);
return createKeypair(
keypairType,
privateKey?.marshal(),
publicKey?.marshal()
);
}