Bluetooth error message
This commit is contained in:
parent
c2cc2fd612
commit
d98a9a99c0
3 changed files with 20 additions and 9 deletions
|
|
@ -117,10 +117,6 @@ export class LedgerService {
|
|||
}
|
||||
|
||||
let resolved = false;
|
||||
// if (this.ledger.status === LedgerStatus.READY) {
|
||||
// this.ledgerStatus$.next({ status: this.ledger.status, statusText: 'Ledger device already ready' });
|
||||
// return true; // Already ready?
|
||||
// }
|
||||
|
||||
setTimeout(() => {
|
||||
if (resolved || this.ledger.status === LedgerStatus.READY) return;
|
||||
|
|
@ -146,6 +142,7 @@ export class LedgerService {
|
|||
} catch (err) {
|
||||
console.log(err);
|
||||
if (err.statusCode === STATUS_CODES.SECURITY_STATUS_NOT_SATISFIED) {
|
||||
this.setLedgerStatus(LedgerStatus.LOCKED, `Ledger device locked`);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -237,6 +234,11 @@ export class LedgerService {
|
|||
await this.getLedgerAccount(0, false);
|
||||
this.setLedgerStatus(LedgerStatus.READY);
|
||||
} catch (err) {
|
||||
if (err.statusCode === STATUS_CODES.SECURITY_STATUS_NOT_SATISFIED) {
|
||||
this.setLedgerStatus(LedgerStatus.LOCKED, `Ledger device locked`);
|
||||
return;
|
||||
// Stop polling when ledger is locked...? or keep going?
|
||||
}
|
||||
this.setLedgerStatus(LedgerStatus.NOT_CONNECTED, `Ledger Disconnected: ${err.message || err }`);
|
||||
this.pollingLedger = false;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -316,9 +316,6 @@
|
|||
<div *ngIf="ledger.status === ledgerStatus.NOT_CONNECTED">
|
||||
<p>Make sure you have the nano app installed and running on your Ledger, then click one of the buttons below to connect via either USB or Bluetooth.</p>
|
||||
<p *ngIf="!ledgerService.isDesktop && !ledgerService.supportsBluetooth">Bluetooth is currently not supported by your browser, please use Chrome, Edge, Opera or Brave</p>
|
||||
<p *ngIf="ledgerService.isDesktop">
|
||||
<span *ngIf="!ledgerService.supportsBluetooth">No compatible Bluetooth hardware found. 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).</span>
|
||||
</p>
|
||||
<p><a href="https://docs.nault.cc/2020/08/04/ledger-guide.html" target="_blank" rel="noopener noreferrer">Ledger/Nault User Guide and Troubleshooting</a></p>
|
||||
<br>
|
||||
</div>
|
||||
|
|
@ -364,11 +361,23 @@
|
|||
</div>
|
||||
<p>
|
||||
<b>Ledger Device Connected</b><br>
|
||||
Ledger imported successfully.
|
||||
Ledger data was imported successfully.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div *ngIf="ledgerService.isDesktop && !ledgerService.supportsBluetooth">
|
||||
<div class="uk-alert uk-alert-danger nlt-inline-alert">
|
||||
<div class="icon-column">
|
||||
<div uk-icon="icon: warning; ratio: 2;"></div>
|
||||
</div>
|
||||
<p>
|
||||
<b>No Compatible Bluetooth Hardware Detected</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>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div uk-grid *ngIf="selectedImportOption === 'privateKey'" class="uk-margin-top">
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ export class WalletWidgetComponent implements OnInit {
|
|||
ledgerStatus = {
|
||||
status: 'not-connected',
|
||||
statusText: '',
|
||||
}
|
||||
};
|
||||
powAlert = false;
|
||||
|
||||
unlockPassword = '';
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue