Remove (hopefully) last place the type of a pairing request is being checked

pull/591/head
Beaudan Brown 6 years ago
parent 8235662518
commit 94b0faf2aa

@ -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