hypercore-signing-request 5.1.1 → 5.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +2 -2
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -57,7 +57,7 @@ const Request = {
|
|
|
57
57
|
throw new Error('Unknown signing request version: ' + version)
|
|
58
58
|
}
|
|
59
59
|
|
|
60
|
-
const type = version
|
|
60
|
+
const type = version <= COMPAT_VERSION ? REQUEST : c.uint8.decode(state)
|
|
61
61
|
if (type !== REQUEST) {
|
|
62
62
|
throw new Error('Expected an encoded request')
|
|
63
63
|
}
|
|
@@ -126,7 +126,7 @@ const Response = {
|
|
|
126
126
|
throw new Error('Response version is not supported, please upgrade')
|
|
127
127
|
}
|
|
128
128
|
|
|
129
|
-
const type = version
|
|
129
|
+
const type = version <= COMPAT_VERSION ? RESPONSE : c.uint8.decode(state)
|
|
130
130
|
if (type !== RESPONSE) {
|
|
131
131
|
throw new Error('Expected an encoded response')
|
|
132
132
|
}
|