chore: code format

This commit is contained in:
Vlad Stan 2022-07-13 12:45:38 +03:00
parent 41608b4b30
commit ae68c4dc6e

View file

@ -519,6 +519,7 @@ new Vue({
navigator.serial.addEventListener('disconnect', event => {
console.log('### navigator.serial event: disconnected!', event)
})
try {
// const ports = await navigator.serial.getPorts();
const port = await navigator.serial.requestPort()
console.log('### port', port)
@ -528,8 +529,9 @@ new Vue({
const writer = port.writable.getWriter()
const psbtByteArray = Uint8Array.from(atob(this.payment.psbtBase64), c =>
c.charCodeAt(0)
const psbtByteArray = Uint8Array.from(
atob(this.payment.psbtBase64),
c => c.charCodeAt(0)
)
await writer.write(psbtByteArray)
@ -538,6 +540,15 @@ new Vue({
await port.close()
console.log('### sharePsbtOnSerialPort done')
} catch (error) {
console.log('### error', error)
this.$q.notify({
type: 'warning',
message: 'Serial port communication failed!',
caption: `${error}`,
timeout: 10000
})
}
},
sharePsbtWithAnimatedQRCode: async function () {
console.log('### sharePsbtWithAnimatedQRCode')