Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
protected async installEvents() {
const networkVersion = await this.getNetworkVersion();
if (networkVersion !== this._networkVersion) {
this.emit(ProviderEvent.NETWORK_CHANGE, networkVersion, this._networkVersion);
this._networkVersion = networkVersion;
}
this.accountId = await this.getAvailableAccounts().then((a) => a[0]);
setTimeout(() => this.installEvents(), 1000);
}