U2F fixes

This commit is contained in:
Aleksander Rem 2022-02-06 17:33:58 +01:00
commit 5f57733aca
3 changed files with 6 additions and 4 deletions

View file

@ -34,7 +34,7 @@ export interface LedgerData {
export class LedgerService {
walletPrefix = `44'/165'/`;
waitTimeout = 30000;
pollInterval = 10000;
pollInterval = 5000;
pollingLedger = false;
queryingLedger = false;

View file

@ -381,7 +381,7 @@
<div uk-icon="icon: warning; ratio: 2;"></div>
</div>
<p>
<b>No Compatible Bluetooth Hardware Detected</b><br>
<b>No Compatible Bluetooth Hardware</b><br>
The Bluetooth support in Nault for desktop is limited to only specific Bluetooth modules.<br>
For better compatibility, please try <a href="https://nault.cc" target="_blank" rel="noopener noreferrer">Nault.cc</a> in a browser with Bluetooth support (Chrome, Edge, Opera or Brave).
</p>

View file

@ -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() {