@walletconnect/ethereum-provider
Advanced tools
Comparing version 1.4.2-rc.0 to 1.4.2-rc.1
@@ -12,2 +12,4 @@ import { IConnector, IWCEthRpcConnectionOptions } from "@walletconnect/types"; | ||
enable(): Promise<ProviderAccounts>; | ||
connect(): Promise<void>; | ||
disconnect(): Promise<void>; | ||
on(event: any, listener: any): void; | ||
@@ -14,0 +16,0 @@ once(event: string, listener: any): void; |
@@ -23,5 +23,3 @@ "use strict"; | ||
case "eth_requestAccounts": | ||
if (!this.signer.connection.connected) { | ||
yield this.signer.connect(); | ||
} | ||
yield this.connect(); | ||
return this.signer.connection.accounts; | ||
@@ -50,2 +48,16 @@ case "eth_accounts": | ||
} | ||
connect() { | ||
return tslib_1.__awaiter(this, void 0, void 0, function* () { | ||
if (!this.signer.connection.connected) { | ||
yield this.signer.connect(); | ||
} | ||
}); | ||
} | ||
disconnect() { | ||
return tslib_1.__awaiter(this, void 0, void 0, function* () { | ||
if (this.signer.connection.connected) { | ||
yield this.signer.disconnect(); | ||
} | ||
}); | ||
} | ||
on(event, listener) { | ||
@@ -52,0 +64,0 @@ this.events.on(event, listener); |
{ | ||
"name": "@walletconnect/ethereum-provider", | ||
"version": "1.4.2-rc.0", | ||
"version": "1.4.2-rc.1", | ||
"description": "Ethereum Provider for WalletConnect", | ||
@@ -64,7 +64,7 @@ "scripts": { | ||
"dependencies": { | ||
"@json-rpc-tools/provider": "^1.7.1", | ||
"@walletconnect/client": "^1.4.2-rc.0", | ||
"@walletconnect/signer-connection": "^1.4.2-rc.0", | ||
"@walletconnect/types": "^1.4.2-rc.0", | ||
"@walletconnect/utils": "^1.4.2-rc.0", | ||
"@json-rpc-tools/provider": "^1.7.2", | ||
"@walletconnect/client": "^1.4.2-rc.1", | ||
"@walletconnect/signer-connection": "^1.4.2-rc.1", | ||
"@walletconnect/types": "^1.4.2-rc.1", | ||
"@walletconnect/utils": "^1.4.2-rc.1", | ||
"eip1193-provider": "1.0.1", | ||
@@ -71,0 +71,0 @@ "eventemitter3": "4.0.7" |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
981563
1928