@exodus/web3-ethereum 11.3.0 → 11.3.1
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.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AssetNotSupportedError, InvalidInputError, UnauthorizedError, UserRejectedRequestError, } from '@exodus/web3-errors';
|
|
1
|
+
import { AssetNotSupportedError, InvalidInputError, UnauthorizedError, UnsupportedMethodError, UserRejectedRequestError, } from '@exodus/web3-errors';
|
|
2
2
|
import { bufferToHex0xString, hex0xStringToBuffer, } from '@exodus/web3-ethereum-utils';
|
|
3
3
|
import { connect } from '@exodus/web3-rpc-handlers';
|
|
4
4
|
import { hexToBN } from '@exodus/web3-utils';
|
|
@@ -276,4 +276,7 @@ export function exposeHandlers(rpc, deps) {
|
|
|
276
276
|
}
|
|
277
277
|
return true;
|
|
278
278
|
});
|
|
279
|
+
exposeEvmFunction('wallet_getSnaps', async () => {
|
|
280
|
+
throw new UnsupportedMethodError();
|
|
281
|
+
});
|
|
279
282
|
}
|
|
@@ -2304,6 +2304,26 @@ export function validateRequest(value) {
|
|
|
2304
2304
|
return false
|
|
2305
2305
|
}
|
|
2306
2306
|
break
|
|
2307
|
+
case 'wallet_getSnaps':
|
|
2308
|
+
if (!('params' in data && hasOwn(data, 'params'))) {
|
|
2309
|
+
validate.errors = [
|
|
2310
|
+
{
|
|
2311
|
+
keywordLocation: '#/oneOf/46/required',
|
|
2312
|
+
instanceLocation: '#/params',
|
|
2313
|
+
},
|
|
2314
|
+
]
|
|
2315
|
+
return false
|
|
2316
|
+
}
|
|
2317
|
+
if (!(Array.isArray(data.params) && data.params.length === 0)) {
|
|
2318
|
+
validate.errors = [
|
|
2319
|
+
{
|
|
2320
|
+
keywordLocation: '#/oneOf/46/properties/params/const',
|
|
2321
|
+
instanceLocation: '#/params',
|
|
2322
|
+
},
|
|
2323
|
+
]
|
|
2324
|
+
return false
|
|
2325
|
+
}
|
|
2326
|
+
break
|
|
2307
2327
|
default:
|
|
2308
2328
|
validate.errors = [
|
|
2309
2329
|
{ keywordLocation: '#/oneOf', instanceLocation: '#' },
|
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": "11.3.
|
|
4
|
+
"version": "11.3.1",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
7
7
|
"module": "lib/index.js",
|
|
@@ -51,5 +51,5 @@
|
|
|
51
51
|
"peerDependencies": {
|
|
52
52
|
"@exodus/assets": "^8.0.95"
|
|
53
53
|
},
|
|
54
|
-
"gitHead": "
|
|
54
|
+
"gitHead": "3cb36cc44c40fba81878bc5701db7830e3b837e8"
|
|
55
55
|
}
|