Merge pull request #591 from BeaudanBrown/type-fix

Fix pairing error
pull/598/head
Beaudan Campbell-Brown 6 years ago committed by GitHub
commit 09da4af2df
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -77,16 +77,10 @@
secondaryDevicePubKey, secondaryDevicePubKey,
requestSignature, requestSignature,
grantSignature, grantSignature,
type,
}) { }) {
if ( if (!primaryDevicePubKey || !secondaryDevicePubKey || !requestSignature) {
!primaryDevicePubKey ||
!secondaryDevicePubKey ||
!requestSignature ||
typeof type !== 'number'
) {
throw new Error( throw new Error(
'createPairingAuthorisationProtoMessage: pubkeys or type is not set' 'createPairingAuthorisationProtoMessage: pubkeys missing'
); );
} }
if (requestSignature.constructor !== ArrayBuffer) { if (requestSignature.constructor !== ArrayBuffer) {
@ -104,7 +98,6 @@
grantSignature: grantSignature ? new Uint8Array(grantSignature) : null, grantSignature: grantSignature ? new Uint8Array(grantSignature) : null,
primaryDevicePubKey, primaryDevicePubKey,
secondaryDevicePubKey, secondaryDevicePubKey,
type,
}); });
} }
// Serialise as <Element0.length><Element0><Element1.length><Element1>... // Serialise as <Element0.length><Element0><Element1.length><Element1>...

Loading…
Cancel
Save