@particle-network/provider
Advanced tools
Comparing version 0.7.7-alpha.5 to 0.7.7-alpha.6
@@ -64,11 +64,2 @@ "use strict"; | ||
}; | ||
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) { | ||
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { | ||
if (ar || !(i in from)) { | ||
if (!ar) ar = Array.prototype.slice.call(from, 0, i); | ||
ar[i] = from[i]; | ||
} | ||
} | ||
return to.concat(ar || Array.prototype.slice.call(from)); | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
@@ -91,35 +82,10 @@ exports.ParticleDelegateProvider = void 0; | ||
} | ||
ParticleDelegateProvider.prototype.emit = function (eventName) { | ||
var _a; | ||
var args = []; | ||
for (var _i = 1; _i < arguments.length; _i++) { | ||
args[_i - 1] = arguments[_i]; | ||
} | ||
if (!this.events) { | ||
console.error("Particle Delegate Provider events undefined"); | ||
} | ||
return (_a = this.events).emit.apply(_a, __spreadArray([eventName], args, false)); | ||
}; | ||
ParticleDelegateProvider.prototype.listenEvent = function () { | ||
this.signerProvider.on("connect", this.onConnectEvent); | ||
this.signerProvider.on("disconnect", this.onDisconnectEvent); | ||
this.signerProvider.on("message", this.onMessageEvent); | ||
this.signerProvider.on("chainChanged", this.onChainChangedEvent); | ||
this.signerProvider.on("accountsChanged", this.onAccountsChangedEvent); | ||
var event = this.events; | ||
this.signerProvider.on("connect", function (result) { return event.emit("connect", result); }); | ||
this.signerProvider.on("disconnect", function (result) { return event.emit("disconnect", result); }); | ||
this.signerProvider.on("message", function (result) { return event.emit("message", result); }); | ||
this.signerProvider.on("chainChanged", function (result) { return event.emit("chainChanged", result); }); | ||
this.signerProvider.on("accountsChanged", function (result) { return event.emit("accountsChanged", result); }); | ||
}; | ||
ParticleDelegateProvider.prototype.onConnectEvent = function (result) { | ||
this.emit("connect", result); | ||
}; | ||
ParticleDelegateProvider.prototype.onDisconnectEvent = function (result) { | ||
this.emit("disconnect", result); | ||
}; | ||
ParticleDelegateProvider.prototype.onMessageEvent = function (result) { | ||
this.emit("message", result); | ||
}; | ||
ParticleDelegateProvider.prototype.onChainChangedEvent = function (result) { | ||
this.emit("chainChanged", result); | ||
}; | ||
ParticleDelegateProvider.prototype.onAccountsChangedEvent = function (result) { | ||
this.emit("accountsChanged", result); | ||
}; | ||
ParticleDelegateProvider.prototype.setConnection = function () { | ||
@@ -126,0 +92,0 @@ var _this = this; |
@@ -10,9 +10,3 @@ import { IEthereumProvider, IJsonRpcProvider, ProviderAccounts } from "./types"; | ||
constructor(auth: Auth, signerProvider: IEthereumProvider, rpcUrl?: string | undefined); | ||
private emit; | ||
private listenEvent; | ||
private onConnectEvent; | ||
private onDisconnectEvent; | ||
private onMessageEvent; | ||
private onChainChangedEvent; | ||
private onAccountsChangedEvent; | ||
private setConnection; | ||
@@ -19,0 +13,0 @@ disconnect(): Promise<void>; |
{ | ||
"name": "@particle-network/provider", | ||
"version": "0.7.7-alpha.5", | ||
"version": "0.7.7-alpha.6", | ||
"files": [ | ||
@@ -31,3 +31,3 @@ "lib", | ||
}, | ||
"gitHead": "b198ce77c5a53a505b7ac2ff66cd517d0bed0716" | ||
"gitHead": "3f1dc4692b6c2384c3c074729074cfe420506e8e" | ||
} |
Sorry, the diff of this file is not supported yet
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
81299
1093