From 4ec6623c3b481eb194cd0a83166f010bc4b6f4aa Mon Sep 17 00:00:00 2001 From: iGroza Date: Mon, 4 Sep 2023 21:55:36 +0700 Subject: [PATCH] fix(Ledger): increase connection time --- package.json | 2 +- src/provider.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 8380ea8..a457932 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@haqq/provider-ledger-react-native", - "version": "0.0.18", + "version": "0.0.19", "description": "Provider for react-native ledger", "main": "dist/index.js", "types": "dist/index.d.ts", diff --git a/src/provider.ts b/src/provider.ts index 99e38d7..77ec77b 100644 --- a/src/provider.ts +++ b/src/provider.ts @@ -228,7 +228,7 @@ export class ProviderLedgerReactNative this.once(stopTaskEventName, handleStopTask); } - while (!this._transport && !this.stop && attempts < 150) { + while (!this._transport && !this.stop && attempts < 115) { if (canceled) { throw new Error('canceled'); } @@ -242,7 +242,7 @@ export class ProviderLedgerReactNative } } catch (e) { this.emit('awaitForTransport', new Date(), e, attempts); - await sleep(500); + await sleep(1000); attempts += 1; } }