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.
Files changed (2) hide show
  1. package/index.js +2 -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 < COMPAT_VERSION ? REQUEST : c.uint8.decode(state)
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 > COMPAT_VERSION ? c.uint8.decode(state) : RESPONSE
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
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hypercore-signing-request",
3
- "version": "5.1.1",
3
+ "version": "5.1.2",
4
4
  "description": "Generate shareable signing requests for Hypercore",
5
5
  "main": "index.js",
6
6
  "scripts": {