@exodus/web3-ethereum 1.4.5 → 1.4.6
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/lib/rpc-handlers/validator.js +25 -21
- package/package.json +3 -3
|
@@ -144,31 +144,35 @@ export function validateRequest(value) {
|
|
|
144
144
|
return true
|
|
145
145
|
})()
|
|
146
146
|
const sub10 = (() => {
|
|
147
|
+
if (!(data[i] === null)) return false
|
|
148
|
+
return true
|
|
149
|
+
})()
|
|
150
|
+
const sub11 = (() => {
|
|
147
151
|
if (!Array.isArray(data[i])) return false
|
|
148
152
|
if (data[i].length < 1) return false
|
|
149
153
|
for (let j = 0; j < data[i].length; j++) {
|
|
150
154
|
if (j in data[i] && hasOwn(data[i], j)) {
|
|
151
|
-
const
|
|
155
|
+
const sub12 = (() => {
|
|
152
156
|
if (!(typeof data[i][j] === 'number')) return false
|
|
153
157
|
return true
|
|
154
158
|
})()
|
|
155
|
-
const
|
|
159
|
+
const sub13 = (() => {
|
|
156
160
|
if (!(typeof data[i][j] === 'string')) return false
|
|
157
161
|
if (data[i][j].length > 100 && stringLength(data[i][j]) > 100)
|
|
158
162
|
return false
|
|
159
163
|
if (!format3.test(data[i][j])) return false
|
|
160
164
|
return true
|
|
161
165
|
})()
|
|
162
|
-
if (!(
|
|
166
|
+
if (!(sub12 || sub13)) return false
|
|
163
167
|
}
|
|
164
168
|
}
|
|
165
169
|
return true
|
|
166
170
|
})()
|
|
167
|
-
const
|
|
171
|
+
const sub14 = (() => {
|
|
168
172
|
if (!(Array.isArray(data[i]) && data[i].length === 0)) return false
|
|
169
173
|
return true
|
|
170
174
|
})()
|
|
171
|
-
if (!(sub2 || sub3 || sub8 || sub9 || sub10 ||
|
|
175
|
+
if (!(sub2 || sub3 || sub8 || sub9 || sub10 || sub11 || sub14)) {
|
|
172
176
|
validate.errors = [
|
|
173
177
|
{ keywordLocation: '#/items/anyOf', instanceLocation: '#/' + i },
|
|
174
178
|
]
|
|
@@ -241,17 +245,17 @@ export function validateRequest(value) {
|
|
|
241
245
|
}
|
|
242
246
|
if ('chainId' in data && hasOwn(data, 'chainId')) {
|
|
243
247
|
let passes1 = 0
|
|
244
|
-
const
|
|
248
|
+
const sub15 = (() => {
|
|
245
249
|
if (!(typeof data.chainId === 'string')) return false
|
|
246
250
|
if (!format4.test(data.chainId)) return false
|
|
247
251
|
return true
|
|
248
252
|
})()
|
|
249
|
-
if (
|
|
250
|
-
const
|
|
253
|
+
if (sub15) passes1++
|
|
254
|
+
const sub16 = (() => {
|
|
251
255
|
if (!(typeof data.chainId === 'number')) return false
|
|
252
256
|
return true
|
|
253
257
|
})()
|
|
254
|
-
if (
|
|
258
|
+
if (sub16) passes1++
|
|
255
259
|
if (passes1 !== 1) {
|
|
256
260
|
validate.errors = [
|
|
257
261
|
{
|
|
@@ -385,17 +389,17 @@ export function validateRequest(value) {
|
|
|
385
389
|
hasOwn(data, 'maxPriorityFeePerGas')
|
|
386
390
|
) {
|
|
387
391
|
let passes2 = 0
|
|
388
|
-
const
|
|
392
|
+
const sub17 = (() => {
|
|
389
393
|
if (!(typeof data.maxPriorityFeePerGas === 'string')) return false
|
|
390
394
|
if (!format1.test(data.maxPriorityFeePerGas)) return false
|
|
391
395
|
return true
|
|
392
396
|
})()
|
|
393
|
-
if (
|
|
394
|
-
const
|
|
397
|
+
if (sub17) passes2++
|
|
398
|
+
const sub18 = (() => {
|
|
395
399
|
if (!(data.maxPriorityFeePerGas === null)) return false
|
|
396
400
|
return true
|
|
397
401
|
})()
|
|
398
|
-
if (
|
|
402
|
+
if (sub18) passes2++
|
|
399
403
|
if (passes2 !== 1) {
|
|
400
404
|
validate.errors = [
|
|
401
405
|
{
|
|
@@ -408,17 +412,17 @@ export function validateRequest(value) {
|
|
|
408
412
|
}
|
|
409
413
|
if ('maxFeePerGas' in data && hasOwn(data, 'maxFeePerGas')) {
|
|
410
414
|
let passes3 = 0
|
|
411
|
-
const
|
|
415
|
+
const sub19 = (() => {
|
|
412
416
|
if (!(typeof data.maxFeePerGas === 'string')) return false
|
|
413
417
|
if (!format1.test(data.maxFeePerGas)) return false
|
|
414
418
|
return true
|
|
415
419
|
})()
|
|
416
|
-
if (
|
|
417
|
-
const
|
|
420
|
+
if (sub19) passes3++
|
|
421
|
+
const sub20 = (() => {
|
|
418
422
|
if (!(data.maxFeePerGas === null)) return false
|
|
419
423
|
return true
|
|
420
424
|
})()
|
|
421
|
-
if (
|
|
425
|
+
if (sub20) passes3++
|
|
422
426
|
if (passes3 !== 1) {
|
|
423
427
|
validate.errors = [
|
|
424
428
|
{
|
|
@@ -1028,13 +1032,13 @@ export function validateRequest(value) {
|
|
|
1028
1032
|
}
|
|
1029
1033
|
if ('image' in data && hasOwn(data, 'image')) {
|
|
1030
1034
|
let passes4 = 0
|
|
1031
|
-
const
|
|
1035
|
+
const sub21 = (() => {
|
|
1032
1036
|
if (!(typeof data.image === 'string')) return false
|
|
1033
1037
|
if (!format6.test(data.image)) return false
|
|
1034
1038
|
return true
|
|
1035
1039
|
})()
|
|
1036
|
-
if (
|
|
1037
|
-
const
|
|
1040
|
+
if (sub21) passes4++
|
|
1041
|
+
const sub22 = (() => {
|
|
1038
1042
|
const err38 = validate.errors
|
|
1039
1043
|
const res38 = ref16(data.image)
|
|
1040
1044
|
const suberr38 = ref16.errors
|
|
@@ -1042,7 +1046,7 @@ export function validateRequest(value) {
|
|
|
1042
1046
|
if (!res38) return false
|
|
1043
1047
|
return true
|
|
1044
1048
|
})()
|
|
1045
|
-
if (
|
|
1049
|
+
if (sub22) passes4++
|
|
1046
1050
|
if (passes4 !== 1) {
|
|
1047
1051
|
validate.errors = [
|
|
1048
1052
|
{
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@exodus/web3-ethereum",
|
|
3
3
|
"description": "Apps connectivity library for EVM-compatible chains.",
|
|
4
|
-
"version": "1.4.
|
|
4
|
+
"version": "1.4.6",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
7
7
|
"module": "lib/index.js",
|
|
@@ -44,11 +44,11 @@
|
|
|
44
44
|
"@exodus/json-rpc": "^1.11.0",
|
|
45
45
|
"@exodus/schemasafe": "^1.0.0",
|
|
46
46
|
"@exodus/web3-types": "^1.10.0",
|
|
47
|
-
"@exodus/web3-validation": "^1.29.
|
|
47
|
+
"@exodus/web3-validation": "^1.29.2",
|
|
48
48
|
"@wallet-standard/base": "^1.0.1"
|
|
49
49
|
},
|
|
50
50
|
"peerDependencies": {
|
|
51
51
|
"@exodus/assets": "^8.0.72"
|
|
52
52
|
},
|
|
53
|
-
"gitHead": "
|
|
53
|
+
"gitHead": "4d9d6eed59fbe201c1e6f2abb4b50f1f336bc690"
|
|
54
54
|
}
|