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

@0xsequence/network

Package Overview
Dependencies
Maintainers
5
Versions
481
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@0xsequence/network - npm Package Compare versions

Comparing version 0.27.0 to 0.28.0

11

CHANGELOG.md
# @0xsequence/network
## 0.28.0
### Minor Changes
- extension provider
### Patch Changes
- Updated dependencies [undefined]
- @0xsequence/utils@0.28.0
## 0.27.0

@@ -4,0 +15,0 @@

8

dist/0xsequence-network.cjs.dev.js

@@ -141,4 +141,6 @@ 'use strict';

return a.chainId < b.chainId ? -1 : 1;
}); // Set defaultChainId if passed to set default chain
}); // force-convert to a number in case someone sends a number in a string like "1"
const defaultChainIdNum = parseInt(defaultChainId); // Set defaultChainId if passed to set default chain
if (defaultChainId) {

@@ -149,3 +151,3 @@ let found = false;

if (n.name === defaultChainId || n.chainId === defaultChainId) {
if (n.name === defaultChainId || n.chainId === defaultChainIdNum) {
found = true;

@@ -677,3 +679,3 @@ n.isDefaultChain = true;

} else {
throw new Error(response.error.data);
throw new Error(response.error.message);
}

@@ -680,0 +682,0 @@ }

@@ -141,4 +141,6 @@ 'use strict';

return a.chainId < b.chainId ? -1 : 1;
}); // Set defaultChainId if passed to set default chain
}); // force-convert to a number in case someone sends a number in a string like "1"
const defaultChainIdNum = parseInt(defaultChainId); // Set defaultChainId if passed to set default chain
if (defaultChainId) {

@@ -149,3 +151,3 @@ let found = false;

if (n.name === defaultChainId || n.chainId === defaultChainId) {
if (n.name === defaultChainId || n.chainId === defaultChainIdNum) {
found = true;

@@ -677,3 +679,3 @@ n.isDefaultChain = true;

} else {
throw new Error(response.error.data);
throw new Error(response.error.message);
}

@@ -680,0 +682,0 @@ }

@@ -137,4 +137,6 @@ import { urlClean, logger } from '@0xsequence/utils';

return a.chainId < b.chainId ? -1 : 1;
}); // Set defaultChainId if passed to set default chain
}); // force-convert to a number in case someone sends a number in a string like "1"
const defaultChainIdNum = parseInt(defaultChainId); // Set defaultChainId if passed to set default chain
if (defaultChainId) {

@@ -145,3 +147,3 @@ let found = false;

if (n.name === defaultChainId || n.chainId === defaultChainId) {
if (n.name === defaultChainId || n.chainId === defaultChainIdNum) {
found = true;

@@ -673,3 +675,3 @@ n.isDefaultChain = true;

} else {
throw new Error(response.error.data);
throw new Error(response.error.message);
}

@@ -676,0 +678,0 @@ }

@@ -0,1 +1,2 @@

import { ProviderRpcError } from '@0xsequence/provider';
export declare const JsonRpcVersion = "2.0";

@@ -12,5 +13,5 @@ export interface JsonRpcRequest {

result: any;
error?: any;
error?: ProviderRpcError;
}
export declare type JsonRpcResponseCallback = (error: any, response?: JsonRpcResponse) => void;
export declare type JsonRpcResponseCallback = (error?: ProviderRpcError, response?: JsonRpcResponse) => void;
export declare type JsonRpcHandlerFunc = (request: JsonRpcRequest, callback: JsonRpcResponseCallback, chainId?: number) => void;

@@ -17,0 +18,0 @@ export interface JsonRpcHandler {

{
"name": "@0xsequence/network",
"version": "0.27.0",
"version": "0.28.0",
"description": "network sub-package for Sequence",

@@ -16,3 +16,3 @@ "repository": "https://github.com/0xsequence/sequence.js/tree/master/packages/network",

"dependencies": {
"@0xsequence/utils": "^0.27.0",
"@0xsequence/utils": "^0.28.0",
"@ethersproject/providers": "^5.0.24",

@@ -19,0 +19,0 @@ "ethers": "^5.0.32"

@@ -11,3 +11,3 @@ import { JsonRpcHandlerFunc, JsonRpcRequest, JsonRpcResponse, JsonRpcResponseCallback, JsonRpcMiddleware } from '../types'

} else {
throw new Error(response.error.data)
throw new Error(response.error.message)
}

@@ -14,0 +14,0 @@ }

@@ -0,1 +1,3 @@

import { ProviderRpcError } from '@0xsequence/provider'
export const JsonRpcVersion = '2.0'

@@ -14,6 +16,6 @@

result: any
error?: any
error?: ProviderRpcError
}
export type JsonRpcResponseCallback = (error: any, response?: JsonRpcResponse) => void
export type JsonRpcResponseCallback = (error?: ProviderRpcError, response?: JsonRpcResponse) => void

@@ -29,3 +31,3 @@ export type JsonRpcHandlerFunc = (request: JsonRpcRequest, callback: JsonRpcResponseCallback, chainId?: number) => void

// EIP-1193 function signature
export type JsonRpcRequestFunc = (request: { method: string, params?: any[] }, chainId?: number) => Promise<any>
export type JsonRpcRequestFunc = (request: { method: string; params?: any[] }, chainId?: number) => Promise<any>

@@ -32,0 +34,0 @@ export type JsonRpcMiddleware = (next: JsonRpcHandlerFunc) => JsonRpcHandlerFunc

@@ -133,2 +133,5 @@ import { ethers, BigNumberish } from 'ethers'

// force-convert to a number in case someone sends a number in a string like "1"
const defaultChainIdNum = parseInt(defaultChainId as any)
// Set defaultChainId if passed to set default chain

@@ -139,3 +142,3 @@ if (defaultChainId) {

n.isDefaultChain = false
if (n.name === defaultChainId || n.chainId === defaultChainId) {
if (n.name === defaultChainId || n.chainId === defaultChainIdNum) {
found = true

@@ -142,0 +145,0 @@ n.isDefaultChain = true

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