fix: stop if serial port cannot be open

This commit is contained in:
Vlad Stan
2022-08-03 13:50:07 +03:00
parent 3054248858
commit d541bebf38
3 changed files with 8 additions and 10 deletions
@@ -83,7 +83,8 @@ async function payment(path) {
this.showChecking = true
try {
if (!this.serialSignerRef.isConnected()) {
await this.serialSignerRef.openSerialPort()
const portOpen = await this.serialSignerRef.openSerialPort()
if (!portOpen) return
}
if (!this.serialSignerRef.isAuthenticated()) {
await this.serialSignerRef.hwwShowPasswordDialog()