Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@exodus/asset-json-rpc

Package Overview
Dependencies
Maintainers
0
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@exodus/asset-json-rpc - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

README.md

17

lib/index.js

@@ -19,3 +19,3 @@ "use strict";

function createApi(url, options = {}) {
const api = (0, _wretch.default)(url).middlewares([next => async (url, options) => {
return (0, _wretch.default)(url).middlewares([next => async (url, options) => {
const body = JSON.stringify(_objectSpread({

@@ -30,11 +30,16 @@ jsonrpc: '2.0',

}]).resolve(async res => {
const json = await res.json();
const {
result,
error
} = await res.json();
if (json.error) {
throw new Error(json.error.message);
if (error) {
const err = new Error(error.message);
err.code = error.code;
err.data = error.data;
throw err;
}
return json.result;
return result;
});
return api;
}
{
"name": "@exodus/asset-json-rpc",
"version": "1.0.0",
"version": "1.0.1",
"description": "For all assets",

@@ -15,3 +15,3 @@ "main": "lib/index.js",

},
"gitHead": "667137c8e5d45965140ccbfc5859b04af86d446d"
"gitHead": "f95d996683e3a395f281403a355eb21ef4fd9b22"
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc