From 5f57733aca4081aa0c5d481dc16183646ca384e4 Mon Sep 17 00:00:00 2001 From: Aleksander Rem Date: Sun, 6 Feb 2022 17:33:58 +0100 Subject: [PATCH] U2F fixes --- desktop-app/src/lib/ledger.ts | 2 +- .../configure-wallet/configure-wallet.component.html | 2 +- src/app/services/ledger.service.ts | 6 ++++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/desktop-app/src/lib/ledger.ts b/desktop-app/src/lib/ledger.ts index a660f8e..35e4db0 100644 --- a/desktop-app/src/lib/ledger.ts +++ b/desktop-app/src/lib/ledger.ts @@ -34,7 +34,7 @@ export interface LedgerData { export class LedgerService { walletPrefix = `44'/165'/`; waitTimeout = 30000; - pollInterval = 10000; + pollInterval = 5000; pollingLedger = false; queryingLedger = false; diff --git a/src/app/components/configure-wallet/configure-wallet.component.html b/src/app/components/configure-wallet/configure-wallet.component.html index 115e413..f89c703 100644 --- a/src/app/components/configure-wallet/configure-wallet.component.html +++ b/src/app/components/configure-wallet/configure-wallet.component.html @@ -381,7 +381,7 @@

- No Compatible Bluetooth Hardware Detected
+ No Compatible Bluetooth Hardware
The Bluetooth support in Nault for desktop is limited to only specific Bluetooth modules.
For better compatibility, please try Nault.cc in a browser with Bluetooth support (Chrome, Edge, Opera or Brave).

diff --git a/src/app/services/ledger.service.ts b/src/app/services/ledger.service.ts index e33729a..77d2630 100644 --- a/src/app/services/ledger.service.ts +++ b/src/app/services/ledger.service.ts @@ -48,6 +48,7 @@ export class LedgerService { waitTimeout = 30000; pollInterval = 5000; + u2fPollInterval = 30000; pollingLedger = false; @@ -445,7 +446,7 @@ export class LedgerService { await this.loadLedger(); // Make sure ledger is ready } if (this.isDesktop) { - return this.signBlockDesktop(accountIndex, blockData); + return await this.signBlockDesktop(accountIndex, blockData); } else { return await this.ledger.nano.signBlock(this.ledgerPath(accountIndex), blockData); } @@ -474,9 +475,10 @@ export class LedgerService { pollLedgerStatus() { if (!this.pollingLedger) return; setTimeout(async () => { + if (!this.pollingLedger) return; await this.checkLedgerStatus(); this.pollLedgerStatus(); - }, this.pollInterval); + }, this.transportMode === 'U2F' ? this.u2fPollInterval : this.pollInterval); } async checkLedgerStatus() {