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

@ngeth/ethers-core

Package Overview
Dependencies
Maintainers
3
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ngeth/ethers-core - npm Package Compare versions

Comparing version 0.0.21 to 0.0.22

2

package.json
{
"name": "@ngeth/ethers-core",
"version": "0.0.21",
"version": "0.0.22",
"type": "commonjs",

@@ -5,0 +5,0 @@ "peerDependencies": {

@@ -12,2 +12,4 @@ import { JsonRpcSigner, Web3Provider } from '@ethersproject/providers';

protected abstract onWalletChange(wallet: Wallet): void;
/** Used to run AFTER constructor from the mixins like ngErc1193 */
protected onInit?(): void;
get ethersProvider(): Web3Provider | undefined;

@@ -14,0 +16,0 @@ get ethersSigner(): JsonRpcSigner | undefined;

@@ -6,3 +6,3 @@ import { ERC1193 } from './erc1193';

wallets: WalletProfile[];
constructor();
protected onInit(): void;
protected onWalletChange(wallet: WalletProfile): void;

@@ -9,0 +9,0 @@ protected getWallet(): Promise<WalletProfile | undefined>;

@@ -25,9 +25,18 @@ "use strict";

constructor() {
super();
super(...arguments);
this.wallets = getInjectedProviders().map(toInjectedWallet);
}
onInit() {
if (this.wallets.length === 1)
this.selectWallet(this.wallets[0]);
const label = localStorage.getItem('ngeth:erc1193');
if (label) {
const wallet = this.wallets.find(wallet => wallet.label === label);
if (wallet)
this.selectWallet(wallet);
}
}
onWalletChange(wallet) {
this.wallet = wallet;
localStorage.setItem('ngeth:erc1193', wallet.label);
}

@@ -34,0 +43,0 @@ async getWallet() {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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