diff --git a/lnbits/extensions/watchonly/static/components/serial-port-config/serial-port-config.html b/lnbits/extensions/watchonly/static/components/serial-port-config/serial-port-config.html
index 1c9d89ee..18e52058 100644
--- a/lnbits/extensions/watchonly/static/components/serial-port-config/serial-port-config.html
+++ b/lnbits/extensions/watchonly/static/components/serial-port-config/serial-port-config.html
@@ -83,7 +83,6 @@
filled
dense
v-model.trim="config.buttonOnePin"
- type="number"
label="Pin Number (Button 1)"
>
@@ -94,7 +93,6 @@
filled
dense
v-model.trim="config.buttonTwoPin"
- type="number"
label="Pin Number (Button 2)"
>
diff --git a/lnbits/extensions/watchonly/static/components/serial-port-config/serial-port-config.js b/lnbits/extensions/watchonly/static/components/serial-port-config/serial-port-config.js
index bd95a933..87b54e38 100644
--- a/lnbits/extensions/watchonly/static/components/serial-port-config/serial-port-config.js
+++ b/lnbits/extensions/watchonly/static/components/serial-port-config/serial-port-config.js
@@ -5,12 +5,8 @@ async function serialPortConfig(path) {
props: ['config'],
template: t,
data() {
- return {
- }
+ return {}
},
- methods: {
-
- },
-
+ methods: {}
})
}
diff --git a/lnbits/extensions/watchonly/static/components/serial-signer/serial-signer.html b/lnbits/extensions/watchonly/static/components/serial-signer/serial-signer.html
index 4f23f120..bd8378f6 100644
--- a/lnbits/extensions/watchonly/static/components/serial-signer/serial-signer.html
+++ b/lnbits/extensions/watchonly/static/components/serial-signer/serial-signer.html
@@ -243,7 +243,7 @@
- Check data on the display of the hardware device.
+ Confirm on the hardware device also.
diff --git a/lnbits/extensions/watchonly/static/components/serial-signer/serial-signer.js b/lnbits/extensions/watchonly/static/components/serial-signer/serial-signer.js
index e80b1573..c33a609f 100644
--- a/lnbits/extensions/watchonly/static/components/serial-signer/serial-signer.js
+++ b/lnbits/extensions/watchonly/static/components/serial-signer/serial-signer.js
@@ -336,6 +336,7 @@ async function serialSigner(path) {
this.hww.showPasswordDialog = true
await this.sendCommandSecure(COMMAND_PASSWORD)
} catch (error) {
+ console.log(error)
this.$q.notify({
type: 'warning',
message: 'Failed to connect to Hardware Wallet!',
@@ -599,11 +600,14 @@ async function serialSigner(path) {
)
const publicKeyHex = publicKey.toHex().slice(2)
- await this.sendCommandClearText(COMMAND_PAIR, [
- publicKeyHex,
- this.config.buttonOnePin,
- this.config.buttonTwoPin
- ])
+ const args = [publicKeyHex]
+ if (Number.isInteger(+this.config.buttonOnePin)) {
+ args.push(this.config.buttonOnePin)
+ }
+ if (Number.isInteger(+this.config.buttonTwoPin)) {
+ args.push(this.config.buttonTwoPin)
+ }
+ await this.sendCommandClearText(COMMAND_PAIR, args)
this.$q.notify({
type: 'positive',
message: 'Pairing started!',
diff --git a/lnbits/extensions/watchonly/static/js/utils.js b/lnbits/extensions/watchonly/static/js/utils.js
index fd0afba4..5e39a37f 100644
--- a/lnbits/extensions/watchonly/static/js/utils.js
+++ b/lnbits/extensions/watchonly/static/js/utils.js
@@ -21,8 +21,8 @@ const PAIRING_CONTROL_TEXT = 'lnbits'
const HWW_DEFAULT_CONFIG = Object.freeze({
name: '',
- buttonOnePin: 0,
- buttonTwoPin: 35,
+ buttonOnePin: '',
+ buttonTwoPin: '',
baudRate: 9600,
bufferSize: 255,
dataBits: 8,