Socket
Socket
Sign inDemoInstall

@onekeyfe/cross-inpage-provider-errors

Package Overview
Dependencies
Maintainers
2
Versions
128
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@onekeyfe/cross-inpage-provider-errors - npm Package Compare versions

Comparing version 2.0.0-alpha.10 to 2.0.0-alpha.11

./dist/cjs/index.js

5

dist/cjs/utils.js

@@ -55,3 +55,2 @@ "use strict";

function serializeError(error, { fallbackError = FALLBACK_ERROR, shouldIncludeStack = false, } = {}) {
var _a, _b;
if (!fallbackError ||

@@ -86,3 +85,3 @@ !Number.isInteger(fallbackError.code) ||

serialized.code = fallbackError.code;
const message = (_a = error) === null || _a === void 0 ? void 0 : _a.message;
const message = error === null || error === void 0 ? void 0 : error.message;
serialized.message = (message && typeof message === 'string'

@@ -93,3 +92,3 @@ ? message

}
const stack = (_b = error) === null || _b === void 0 ? void 0 : _b.stack;
const stack = error === null || error === void 0 ? void 0 : error.stack;
if (shouldIncludeStack && error && stack && typeof stack === 'string') {

@@ -96,0 +95,0 @@ serialized.stack = stack;

4

dist/errors.d.ts

@@ -9,4 +9,4 @@ import { Web3RpcError, Web3ProviderError } from './classes';

}
declare type CustomErrorArg<T> = ServerErrorOptions<T>;
declare type Web3ErrorsArg<T> = Web3ErrorOptions<T> | string;
type CustomErrorArg<T> = ServerErrorOptions<T>;
type Web3ErrorsArg<T> = Web3ErrorOptions<T> | string;
export declare const web3Errors: {

@@ -13,0 +13,0 @@ rpc: {

@@ -50,3 +50,2 @@ import { errorCodes, errorValues } from './error-constants';

export function serializeError(error, { fallbackError = FALLBACK_ERROR, shouldIncludeStack = false, } = {}) {
var _a, _b;
if (!fallbackError ||

@@ -81,3 +80,3 @@ !Number.isInteger(fallbackError.code) ||

serialized.code = fallbackError.code;
const message = (_a = error) === null || _a === void 0 ? void 0 : _a.message;
const message = error === null || error === void 0 ? void 0 : error.message;
serialized.message = (message && typeof message === 'string'

@@ -88,3 +87,3 @@ ? message

}
const stack = (_b = error) === null || _b === void 0 ? void 0 : _b.stack;
const stack = error === null || error === void 0 ? void 0 : error.stack;
if (shouldIncludeStack && error && stack && typeof stack === 'string') {

@@ -91,0 +90,0 @@ serialized.stack = stack;

{
"name": "@onekeyfe/cross-inpage-provider-errors",
"version": "2.0.0-alpha.10",
"version": "2.0.0-alpha.11",
"keywords": [

@@ -31,5 +31,5 @@ "cross-inpage-provider"

"dependencies": {
"fast-safe-stringify": "^2.1.1"
"fast-safe-stringify": "^2.0.6"
},
"gitHead": "f760989b7ea7bfca832ba396544808fb99081007"
"gitHead": "db33d14c2a164072b2f5dd4cf94e18886539ab5b"
}
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