@snapshot-labs/snapshot.js 0.12.61 → 0.12.63
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/dist/snapshot.cjs.js +7 -4
- package/dist/snapshot.esm.js +7 -4
- package/dist/snapshot.min.js +2 -2
- package/package.json +1 -1
- package/src/schemas/space.json +2 -2
- package/src/utils.ts +9 -2
package/package.json
CHANGED
package/src/schemas/space.json
CHANGED
|
@@ -313,9 +313,9 @@
|
|
|
313
313
|
"period": {
|
|
314
314
|
"type": "integer",
|
|
315
315
|
"minimum": 0,
|
|
316
|
-
"maximum":
|
|
316
|
+
"maximum": 31622400,
|
|
317
317
|
"errorMessage": {
|
|
318
|
-
"maximum": "Delay must be less than
|
|
318
|
+
"maximum": "Delay must be less than a year"
|
|
319
319
|
}
|
|
320
320
|
},
|
|
321
321
|
"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
|
-
|
|
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
|
}
|
|
@@ -794,7 +798,10 @@ function isValidNetwork(network: string) {
|
|
|
794
798
|
}
|
|
795
799
|
|
|
796
800
|
function isValidAddress(address: string) {
|
|
797
|
-
return
|
|
801
|
+
return (
|
|
802
|
+
address !== EMPTY_ADDRESS &&
|
|
803
|
+
(isAddress(address) || isStarknetAddress(address))
|
|
804
|
+
);
|
|
798
805
|
}
|
|
799
806
|
|
|
800
807
|
function isValidSnapshot(snapshot: number | string, network: string) {
|