fix errors

This commit is contained in:
Marin Petrunić 2020-02-06 09:57:10 +01:00
parent 6fa34d43f8
commit ab94e8966e
No known key found for this signature in database
GPG Key ID: 834D07135E110DA5
2 changed files with 4 additions and 4 deletions

View File

@ -2,11 +2,11 @@
"nested": { "nested": {
"NoiseHandshakePayload": { "NoiseHandshakePayload": {
"fields": { "fields": {
"identity_key": { "identityKey": {
"type": "bytes", "type": "bytes",
"id": 1 "id": 1
}, },
"identity_sig": { "identitySig": {
"type": "bytes", "type": "bytes",
"id": 2 "id": 2
}, },

View File

@ -79,8 +79,8 @@ export async function verifySignedPayload(noiseStaticKey: bytes, plaintext: byte
); );
//temporary fix until protobufsjs conversion options starts working //temporary fix until protobufsjs conversion options starts working
//by default it ends up as Uint8Array //by default it ends up as Uint8Array
receivedPayload.libp2pKey = Buffer.from(receivedPayload.libp2pKey); receivedPayload.identityKey = Buffer.from(receivedPayload.identityKey);
receivedPayload.noiseStaticKeySignature = Buffer.from(receivedPayload.noiseStaticKeySignature); receivedPayload.identitySig = Buffer.from(receivedPayload.identitySig);
} catch (e) { } catch (e) {
throw new Error("Failed to decode received payload. Reason: " + e.message); throw new Error("Failed to decode received payload. Reason: " + e.message);
} }