diff --git a/package.json b/package.json index b37f2fc..529af0c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@xdefi/wallets-connector", - "version": "2.1.5", + "version": "2.1.6", "description": "Cross chain wallets connector with react hooks", "author": "garageinc", "license": "MIT", diff --git a/src/controllers/providers.ts b/src/controllers/providers.ts index 9230d5f..3b685a4 100644 --- a/src/controllers/providers.ts +++ b/src/controllers/providers.ts @@ -259,21 +259,9 @@ export class ProviderController { } public async connectToCachedProviders() { - const connectionTimeout = 600 return Promise.allSettled( (this.cachedProviders || []).map((pid: string) => - Promise.race([ - this.connectTo(pid, this.injectedChains[pid]), - new Promise((_, reject) => - setTimeout(() => { - reject( - new Error( - 'Connection to cached provider timed out: no response from wallet' - ) - ) - }, connectionTimeout) - ) - ]) + this.connectTo(pid, this.injectedChains[pid]) ) ) } diff --git a/src/wallets/index.ts b/src/wallets/index.ts index 8497881..6607a01 100644 --- a/src/wallets/index.ts +++ b/src/wallets/index.ts @@ -119,10 +119,7 @@ export class WalletsConnector { this.cachedProviders.map((providerId, providerIndex) => { const cachedProviderConnect = results[providerIndex] - if ( - cachedProviderConnect.status === 'fulfilled' && - cachedProviderConnect.value !== undefined - ) { + if (cachedProviderConnect.status === 'fulfilled') { const { id, connectedList } = cachedProviderConnect.value this.setAccounts(id, connectedList) } else {