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

@web3-react/url

Package Overview
Dependencies
Maintainers
1
Versions
35
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@web3-react/url - npm Package Compare versions

Comparing version 8.0.14-beta.0 to 8.0.15-beta.0

6

dist/index.d.ts

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

import type { Eip1193Bridge } from '@ethersproject/experimental';
import type { JsonRpcProvider } from '@ethersproject/providers';
import type { ConnectionInfo } from '@ethersproject/web';

@@ -8,3 +8,5 @@ import type { Actions } from '@web3-react/types';

/** {@inheritdoc Connector.provider} */
provider: Eip1193Bridge | undefined;
provider: undefined;
/** {@inheritdoc Connector.customProvider} */
customProvider: JsonRpcProvider | undefined;
private eagerConnection?;

@@ -11,0 +13,0 @@ private url;

"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {

@@ -33,5 +37,2 @@ if (k2 === undefined) k2 = k;

const types_1 = require("@web3-react/types");
function parseChainId(chainId) {
return Number.parseInt(chainId, 16);
}
class Url extends types_1.Connector {

@@ -55,8 +56,4 @@ /**

return this.eagerConnection;
yield (this.eagerConnection = Promise.all([
Promise.resolve().then(() => __importStar(require('@ethersproject/providers'))).then(({ JsonRpcProvider }) => JsonRpcProvider),
Promise.resolve().then(() => __importStar(require('@ethersproject/experimental'))).then(({ Eip1193Bridge }) => Eip1193Bridge),
]).then(([JsonRpcProvider, Eip1193Bridge]) => {
const provider = new JsonRpcProvider(this.url);
this.provider = new Eip1193Bridge(provider.getSigner(), provider);
return (this.eagerConnection = Promise.resolve().then(() => __importStar(require('@ethersproject/providers'))).then(({ JsonRpcProvider }) => {
return new JsonRpcProvider(this.url);
}));

@@ -68,9 +65,9 @@ });

return __awaiter(this, void 0, void 0, function* () {
if (!this.provider)
if (!this.customProvider)
this.actions.startActivation();
yield this.isomorphicInitialize();
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
return this.provider.request({ method: 'eth_chainId' })
.then((chainId) => {
this.actions.update({ chainId: parseChainId(chainId), accounts: [] });
yield this.isomorphicInitialize()
.then((customProvider) => {
this.customProvider = customProvider;
const { chainId } = this.customProvider.network;
this.actions.update({ chainId, accounts: [] });
})

@@ -77,0 +74,0 @@ .catch((error) => {

@@ -12,3 +12,3 @@ {

},
"version": "8.0.14-beta.0",
"version": "8.0.15-beta.0",
"files": [

@@ -27,10 +27,9 @@ "dist/*"

"dependencies": {
"@ethersproject/experimental": "^5.6.0",
"@ethersproject/providers": "^5.6.0",
"@web3-react/types": "^8.0.10-beta.0"
"@web3-react/types": "^8.0.11-beta.0"
},
"devDependencies": {
"@web3-react/store": "^8.0.14-beta.0"
"@web3-react/store": "^8.0.15-beta.0"
},
"gitHead": "2f5bafe498df00221ccc0204ac3349d8c4a3ecec"
"gitHead": "b0c7174f076727da6eef9758e48eed23dd9cadb7"
}
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