@evedex/exchange-crypto 1.0.10 → 1.0.12

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.
@@ -11,7 +11,7 @@ const constants_1 = require("./constants");
11
11
  exports.EIP721Schemas = {
12
12
  domain: {
13
13
  name: "EVEDEX",
14
- version: "1",
14
+ version: "2",
15
15
  salt: "0x5792f7333c35db190e30acc144f049fd15b24f552c0010b8b3e06f9105c37c5a",
16
16
  },
17
17
  withdraw: {
@@ -41,7 +41,7 @@ function validatePayload(payload, schema) {
41
41
  }
42
42
  const [schemaFields] = Object.values(schema);
43
43
  schemaFields.forEach((field) => {
44
- if (!payload[field.name]) {
44
+ if (payload[field.name] === undefined || payload[field.name] === null) {
45
45
  throw new Error(`Missing field "${field.name}" in payload`);
46
46
  }
47
47
  if (field.type.includes("uint") &&
@@ -3,7 +3,7 @@ import { MATCHER_PRECISION } from "./constants";
3
3
  export const EIP721Schemas = {
4
4
  domain: {
5
5
  name: "EVEDEX",
6
- version: "1",
6
+ version: "2",
7
7
  salt: "0x5792f7333c35db190e30acc144f049fd15b24f552c0010b8b3e06f9105c37c5a",
8
8
  },
9
9
  withdraw: {
@@ -5,7 +5,7 @@ export function validatePayload(payload, schema) {
5
5
  }
6
6
  const [schemaFields] = Object.values(schema);
7
7
  schemaFields.forEach((field) => {
8
- if (!payload[field.name]) {
8
+ if (payload[field.name] === undefined || payload[field.name] === null) {
9
9
  throw new Error(`Missing field "${field.name}" in payload`);
10
10
  }
11
11
  if (field.type.includes("uint") &&
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@evedex/exchange-crypto",
3
- "version": "1.0.10",
3
+ "version": "1.0.12",
4
4
  "description": "",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/mjs/index.js",