fix: show message when device not paired

This commit is contained in:
Vlad Stan 2022-08-19 18:54:54 +03:00
parent 95e7633e19
commit 739646f702
3 changed files with 13 additions and 5 deletions

View file

@ -87,8 +87,12 @@ async function payment(path) {
this.showChecking = true this.showChecking = true
try { try {
if (!this.serialSignerRef.isConnected()) { if (!this.serialSignerRef.isConnected()) {
const portOpen = await this.serialSignerRef.openSerialPort() this.$q.notify({
if (!portOpen) return type: 'warning',
message: 'Please connect to a Signing device first!',
timeout: 10000
})
return
} }
if (!this.serialSignerRef.isAuthenticated()) { if (!this.serialSignerRef.isAuthenticated()) {
await this.serialSignerRef.hwwShowPasswordDialog() await this.serialSignerRef.hwwShowPasswordDialog()

View file

@ -243,7 +243,7 @@
<div class="row q-mt-lg"> <div class="row q-mt-lg">
<div class="col-12"> <div class="col-12">
<q-badge class="text-subtitle2" color="yellow" text-color="black"> <q-badge class="text-subtitle2" color="yellow" text-color="black">
<span>Confirm on the hardware device also.</span> <span>Confirm then check the Hardware Device.</span>
</q-badge> </q-badge>
</div> </div>
</div> </div>

View file

@ -255,8 +255,12 @@ async function walletList(path) {
getXpubFromDevice: async function () { getXpubFromDevice: async function () {
try { try {
if (!this.serialSignerRef.isConnected()) { if (!this.serialSignerRef.isConnected()) {
const portOpen = await this.serialSignerRef.openSerialPort() this.$q.notify({
if (!portOpen) return type: 'warning',
message: 'Please connect to a hardware Device first!',
timeout: 10000
})
return
} }
if (!this.serialSignerRef.isAuthenticated()) { if (!this.serialSignerRef.isAuthenticated()) {
await this.serialSignerRef.hwwShowPasswordDialog() await this.serialSignerRef.hwwShowPasswordDialog()