@snapshot-labs/snapshot.js 0.12.62 → 0.12.64

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.
@@ -79,6 +79,10 @@ declare const _default: {
79
79
  pattern: string;
80
80
  maxLength: number;
81
81
  };
82
+ farcaster: {
83
+ type: string;
84
+ title: string;
85
+ };
82
86
  email: {
83
87
  type: string;
84
88
  title: string;
@@ -75,6 +75,10 @@ declare const _default: {
75
75
  pattern: string;
76
76
  maxLength: number;
77
77
  };
78
+ farcaster: {
79
+ type: string;
80
+ title: string;
81
+ };
78
82
  email: {
79
83
  type: string;
80
84
  title: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@snapshot-labs/snapshot.js",
3
- "version": "0.12.62",
3
+ "version": "0.12.64",
4
4
  "repository": "snapshot-labs/snapshot.js",
5
5
  "license": "MIT",
6
6
  "main": "dist/snapshot.cjs.js",
@@ -78,6 +78,10 @@
78
78
  "pattern": "^[A-Za-z0-9_-]*$",
79
79
  "maxLength": 39
80
80
  },
81
+ "farcaster": {
82
+ "type": "string",
83
+ "title": "farcaster"
84
+ },
81
85
  "email": {
82
86
  "type": "string",
83
87
  "title": "email",
@@ -313,9 +317,9 @@
313
317
  "period": {
314
318
  "type": "integer",
315
319
  "minimum": 0,
316
- "maximum": 15552000,
320
+ "maximum": 31622400,
317
321
  "errorMessage": {
318
- "maximum": "Delay must be less than 180 days"
322
+ "maximum": "Delay must be less than a year"
319
323
  }
320
324
  },
321
325
  "type": {
package/src/utils.ts CHANGED
@@ -132,7 +132,11 @@ ajv.addFormat('evmAddress', {
132
132
  ajv.addFormat('starknetAddress', {
133
133
  validate: (value: string) => {
134
134
  try {
135
- return validateAndParseAddress(value) === value;
135
+ // Accept both checksum and lowercase addresses
136
+ // but need to always be padded
137
+ return (
138
+ validateAndParseAddress(value).toLowerCase() === value.toLowerCase()
139
+ );
136
140
  } catch (e: any) {
137
141
  return false;
138
142
  }